Bug #68612 [NEW]: Testing variable

From: Date: Tue, 16 Dec 2014 00:41:57 +0000
Subject: Bug #68612 [NEW]: Testing variable
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189077@lists.php.net to get a copy of this message
From: standus at post dot cz Operating system: Win32, CentOS PHP version: Irrelevant Package: Scripting Engine problem Bug Type: Bug Bug description:Testing variable Description: ------------ I have singleton class and inside some protected variables. In one function I have test check for existing of variables. All variables are tested OK except one with name: '_banners'. Test script: --------------- My test code is like this: Class Variables { ... protected static $_banners=array(); protected static $instance = null; protected function __clone() {} protected static function getInstance($reInit=false) { if(self::$instance==null) { self::$instance = new self(); } if($reInit) {self::$instance = new self();} return self::$instance; } public static function setVar($name='',$value='') { if(!isset(self::${$name})) {return false;} self::${$name}=$value; return true; } } Variable::setVar('_offline'); -> return true-> OK Variable::setVar('_banners'); -> return false-> BAD Expected result: ---------------- Expected result is return true . Actual result: -------------- Now function for return false for variable name "_banners" -- Edit bug report at https://bugs.php.net/bug.php?id=68612&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68612&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68612&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68612&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68612&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68612&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68612&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68612&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68612&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68612&r=support Expected behavior: https://bugs.php.net/fix.php?id=68612&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68612&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68612&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68612&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68612&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68612&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68612&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68612&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68612&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68612&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68612&r=mysqlcfg

« previous php.bugs (#189077) next »