|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-08-18 12:17 UTC] brendel at krumedia dot de
[2010-09-20 14:37 UTC] iliaa@php.net
-Status: Open
+Status: Bogus
[2010-09-20 14:37 UTC] iliaa@php.net
[2010-09-20 14:59 UTC] gphemsley at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 02:00:01 2025 UTC |
Description: ------------ If the parameter passed to switch() is an uninitialized variable, a PHP Notice documenting such is not issued. Test script: --------------- <?php error_reporting( E_ALL ); var_dump( PHP_VERSION, $mode ); switch( $mode ) { default: print '<p>There should be 2 notices of "undefined variable: mode".<br />' . "\n"; print 'One for the var_dump() and one for the switch().</p>' . "\n"; break; } highlight_file( $_SERVER['SCRIPT_FILENAME'] ); ?> Expected result: ---------------- In the above script, two notices of "Undefined variable: mode" should be issued, one for the var_dump() and one for the switch(). Actual result: -------------- In reality, only one notice is issued: the one for the var_dump(). (Taking out that call means that no notices are issued.) I've gotten confirmation that this is present in 5.2.4, 5.2.5, and 5.3.2.