Edit report at http://bugs.php.net/bug.php?id=51791&edit=1
ID: 51791 Updated by: m...@php.net Reported by: iliavlad at mail dot ru Summary: constant() aborts execution when fail to check undefined constant Status: Closed Type: Bug Package: Scripting Engine problem Operating System: Windows, Linux PHP Version: 5.3.2 Assigned To: felipe New Comment: How's this a bug? echo NOTEXISTS; echo NOT::EXISTS; Previous Comments: ------------------------------------------------------------------------ [2010-05-13 04:13:36] fel...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2010-05-13 04:13:32] fel...@php.net Automatic comment from SVN on behalf of felipe Revision: http://svn.php.net/viewvc/?view=revision&revision=299320 Log: - Fixed bug #51791 (constant() aborts execution when fail to check undefined constant) ------------------------------------------------------------------------ [2010-05-13 03:16:14] bj...@php.net This is definitely a bug. ------------------------------------------------------------------------ [2010-05-13 01:02:35] phi...@php.net I don't see this change mentioned at any of the following locations: - http://php.net/php5news - http://php.net/migration53 - http://php.net/function.constant Therefore, it can't be completely bogus. Please explain if this BC break in 5_3 is intentional. constant('IDONOTEXIST') still returns NULL however, with E_WARNING instead of E_FATAL. ------------------------------------------------------------------------ [2010-05-13 00:09:29] iliavlad at mail dot ru Hi Mike, according to manual http://php.net/manual/en/function.constant.php constant() eturns the value of the constant, or NULL if the constant is not defined. And this happens with php 5.2 version. With php 5.3 there is a fatal error and php interpreter stops. There are no words about fatal error in manual. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=51791 -- Edit this bug report at http://bugs.php.net/bug.php?id=51791&edit=1