note 113642 added to reflectionclass.getconstant

From: Date: Fri, 08 Nov 2013 15:27:59 +0000
Subject: note 113642 added to reflectionclass.getconstant
Groups: php.notes 
Request: Send a blank email to php-notes+get-197468@lists.php.net to get a copy of this message
If the $name constant doesn't exist in the targetted class the function returns bool(false), not empty nor null but false (you to test with "===" $constFounded = false ; $this->currentlangClass = new ReflectionClass($langFile); $this->currentlangClass->getConstant($constant); if($myConst !== false){ $constFounded = true ; } ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/reflectionclass.getconstant.php Edit -- https://master.php.net/note/edit/113642 Del: integrated -- https://master.php.net/note/delete/113642/integrated Del: useless -- https://master.php.net/note/delete/113642/useless Del: bad code -- https://master.php.net/note/delete/113642/bad+code Del: spam -- https://master.php.net/note/delete/113642/spam Del: non-english -- https://master.php.net/note/delete/113642/non-english Del: in docs -- https://master.php.net/note/delete/113642/in+docs Del: other reasons-- https://master.php.net/note/delete/113642 Reject -- https://master.php.net/note/reject/113642 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#197468) next »