|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesdiff_of_zend_compile.c (last revision 2012-10-23 02:30 UTC by tomoya-yokota at cybozu dot co dot jp)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-10-23 03:39 UTC] laruence@php.net
[2012-10-23 04:27 UTC] tomoya-yokota at cybozu dot co dot jp
[2012-10-23 06:00 UTC] laruence@php.net
[2012-10-23 06:09 UTC] tomoya-yokota at cybozu dot co dot jp
[2012-10-23 07:18 UTC] laruence@php.net
-Assigned To:
+Assigned To: laruence
[2012-10-23 07:18 UTC] laruence@php.net
[2012-10-23 08:25 UTC] laruence@php.net
[2015-04-14 14:12 UTC] dmitry@php.net
-Status: Assigned
+Status: Not a bug
[2015-04-14 14:12 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 06:00:01 2025 UTC |
Description: ------------ 1. set error_reporting with error_report( E_STRICT & ~ E_STRICT ). 2. call set_error_handler( callable $error_handler, E_STRICT & ~ E_STRICT ). 3. execute Bellow script(test.php) 4. E_NOTICE Error occur ( Error Message is Use of undefined constant XXX - assumed 'XXX' ) # when the script of PHP is splitted by Class, This issue does not occur. Test script: --------------- ------ test.php ------ <?php error_reporting( E_ALL & ~ E_STRICT ); function myErrorHandler($errno, $errstr, $errfile, $errline) { if( $errno === E_NOTICE ) { echo "{$errstr}\n"; } if( $errno === E_STRICT ) { echo "{$errstr}\n"; } } set_error_handler('myErrorHandler', E_ALL & ~ E_STRICT ); require_once("sample.php"); ------ sample.php ------ <?php define("TEST", "123"); class Hoge2 { public function moge($var=TEST, $moge=null) { return true; } } class HogeChild extends Hoge2 { public function moge($var=TEST) { return true; } } Expected result: ---------------- 1. E_NOTICE would not be reported 2. E_STRICT wouble be reported. Actual result: -------------- 1. E_NOTICE was reported. ---- error message ---- Use of undefined constant TEST - assumed 'TEST'