|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-09-03 14:59 UTC] bensor987 at neuf dot fr
[2015-09-03 17:36 UTC] cmb@php.net
-Assigned To:
+Assigned To: cmb
[2015-09-03 17:36 UTC] cmb@php.net
[2015-09-03 17:36 UTC] cmb@php.net
-Type: Bug
+Type: Documentation Problem
[2015-09-06 17:02 UTC] cmb@php.net
[2015-09-06 17:03 UTC] cmb@php.net
-Status: Assigned
+Status: Closed
[2015-09-06 17:03 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Jan 03 19:00:01 2026 UTC |
Description: ------------ A Fatal Error "Undefined constant" is triggered when I use a namespace on an undefined constant, but not when I don't. Test script: --------------- <?php try { echo \UNDEF_CONSTANT; } catch (Error $e) { echo "Fatal Error NS : " . $e->getMessage(); } try { echo UNDEF_CONSTANT; } catch (Error $e) { echo "Fatal Error w/o NS : " . $e->getMessage(); } Expected result: ---------------- One of these : - UNDEF_CONSTANTUNDEF_CONSTANT - Fatal Error NS : Undefined constant 'UNDEF_CONSTANT'Fatal Error w/o NS : Undefined constant 'UNDEF_CONSTANT' Actual result: -------------- Fatal Error NS : Undefined constant 'UNDEF_CONSTANT'UNDEF_CONSTANT