note 115897 added to reflectionfunctionabstract.getstaticvariables

From: Date: Sat, 11 Oct 2014 13:27:15 +0000
Subject: note 115897 added to reflectionfunctionabstract.getstaticvariables
Groups: php.notes 
Request: Send a blank email to php-notes+get-200624@lists.php.net to get a copy of this message
<?php function test() { static $a = 0, $b = 15; $a++; $b++; return $a; } $rf = new ReflectionFunction('test'); // result - Array ( [a] => 0 [b] => 15 ) print_r( $rf->getStaticVariables() ); //call test function and print again static variables test(); // result - Array ( [a] => 1 [b] => 16 ) print_r( $rf->getStaticVariables() ); ?> ---- Server IP: 72.52.91.14 Probable Submitter: 217.76.3.216 ---- Manual Page -- http://php.net/manual/en/reflectionfunctionabstract.getstaticvariables.php Edit -- https://master.php.net/note/edit/115897 Del: integrated -- https://master.php.net/note/delete/115897/integrated Del: useless -- https://master.php.net/note/delete/115897/useless Del: bad code -- https://master.php.net/note/delete/115897/bad+code Del: spam -- https://master.php.net/note/delete/115897/spam Del: non-english -- https://master.php.net/note/delete/115897/non-english Del: in docs -- https://master.php.net/note/delete/115897/in+docs Del: other reasons-- https://master.php.net/note/delete/115897 Reject -- https://master.php.net/note/reject/115897 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200624) next »