note 79618 deleted from function.strtotime by peehaa

From: Date: Fri, 06 Jan 2017 16:07:10 +0000
Subject: note 79618 deleted from function.strtotime by peehaa
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208736@lists.php.net to get a copy of this message
Note Submitter: andrew dot myers at civicwifi dot com ---- Here is a list of differences between PHP 4 and PHP 5 that I have found (specifically PHP 4.4.2 and PHP 5.2.3). <?php $ts_from_nothing = strtotime(); var_dump($ts_from_nothing); // PHP 5 // bool(false) // WARNING: Wrong parameter count... // PHP 4 // NULL // WARNING: Wrong parameter count... // remember that unassigned variables evaluate to NULL $ts_from_null = strtotime($null); var_dump($ts_from_null)... // PHP 5 // bool(false) // throws a NOTICE: Undefined variable // PHP 4 // current time // NOTICE: Undefined variable $null... // NOTICE: Called with empty time parameter... $ts_from_empty = strtotime(""); var_dump($ts_from_empty); // PHP 5 // bool(false) // PHP 4 // current time // NOTICE: Called with empty time parameter $ts_from_bogus = strtotime("not a date"); var_dump($ts_from_bogus); // PHP 5 // bool(false) // PHP 4 // -1 ?>

« previous php.notes (#208736) next »