Monthly Archives: August 2013

php ini_get may return unexpected results !

Many ini memory size values, such as upload_max_filesize, are stored in the php.ini file in shorthand notation. ini_get() will return the exact string stored in the php.ini file and NOT its integer equivalent. Attempting normal arithmetic functions on these values will not have otherwise expected results.

#intel opensource #minnowboard

#intel opensource atom based #minnowboard motherboard

see also

#php #dates

how to add a year to a php date


$oneyear = strtotime("+1 year");

PHP 5.2

$date = getdate();
$oneyear = mktime(
echo $oneyear;
echo PHP_EOL;

PHP 5.3

$oneyear = date_timestamp_get(
        date_interval_create_from_date_string('1 year')));
echo $oneyear;
echo PHP_EOL;