|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-12-16 01:05 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2014-12-16 01:05 UTC] requinix@php.net
[2014-12-16 13:31 UTC] standus at post dot cz
-Status: Feedback
+Status: Closed
[2014-12-16 13:31 UTC] standus at post dot cz
[2014-12-16 18:15 UTC] ab@php.net
-Status: Closed
+Status: Not a bug
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 05:00:01 2026 UTC |
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"