note 93113 added to function.extract

From: Date: Mon, 24 Aug 2009 11:04:58 +0000
Subject: note 93113 added to function.extract
Groups: php.notes 
Request: Send a blank email to php-notes+get-159825@lists.php.net to get a copy of this message
When using EXTR_PREFIX_ALL - and probably all the other EXTR_PREFIX_* constants - and a numerically-indexed array, extract() will add an underscore ("_") between the prefix and the index. <?php extract(array('foo', 'bar'), EXTR_PREFIX_ALL, 'var'); print_r(get_defined_vars()); // Reveals $var_0 = 'foo' and $var_1 = 'bar' ?> ---- Server IP: 92.48.74.199 Probable Submitter: 78.151.115.225 ---- Manual Page -- http://www.php.net/manual/en/function.extract.php Edit -- https://master.php.net/note/edit/93113 Del: integrated -- https://master.php.net/note/delete/93113/integrated Del: useless -- https://master.php.net/note/delete/93113/useless Del: bad code -- https://master.php.net/note/delete/93113/bad+code Del: spam -- https://master.php.net/note/delete/93113/spam Del: non-english -- https://master.php.net/note/delete/93113/non-english Del: in docs -- https://master.php.net/note/delete/93113/in+docs Del: other reasons-- https://master.php.net/note/delete/93113 Reject -- https://master.php.net/note/reject/93113 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#159825) next »