From: koraktor at web dot de Operating system: Windows XP SP2 PHP version: 5.2.4 PHP Bug Type: Scripting Engine problem Bug description: include in if-expression problem
Description: ------------ Included code in an if-expression is only available in the if-branch not the if-expression itself. Reproduce code: --------------- if(file_exists("code_to_include.php") && include("code_to_include.php") && check_included_code()) { task(); } Expected result: ---------------- Included code from "code_to_include.php" should be accessible in check_included_code() and anything afterwards. Actual result: -------------- Included code from "code_to_include.php" is accessible in task(), but not in check_included_code(). -- Edit bug report at http://bugs.php.net/?id=42639&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42639&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42639&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42639&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42639&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42639&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42639&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42639&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42639&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42639&r=support Expected behavior: http://bugs.php.net/fix.php?id=42639&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42639&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42639&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42639&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42639&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42639&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42639&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42639&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42639&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42639&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42639&r=mysqlcfg