note 112068 added to function.extract
| From: | dotslash.luatgmail.com | Date: | Mon, 29 Apr 2013 12:55:46 +0000 |
| Subject: | note 112068 added to function.extract | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194652@lists.php.net to get a copy of this message | ||
You can't extract a numeric indexed array(e.g. non-assoc array).
<?php
$a = array(
1,
2
);
extract($a);
var_dump(${1});
?>
result:
PHP Notice: Undefined variable: 1 in /Users/Lutashi/t.php on line 7
Notice: Undefined variable: 1 in /Users/Lutashi/t.php on line 7
NULL
----
Server IP: 220.181.129.130
Probable Submitter: 180.213.39.136 (proxied: 180.213.39.136)
----
Manual Page -- http://php.net/manual/en/function.extract.php
Edit -- https://master.php.net/note/edit/112068
Del: integrated -- https://master.php.net/note/delete/112068/integrated
Del: useless -- https://master.php.net/note/delete/112068/useless
Del: bad code -- https://master.php.net/note/delete/112068/bad+code
Del: spam -- https://master.php.net/note/delete/112068/spam
Del: non-english -- https://master.php.net/note/delete/112068/non-english
Del: in docs -- https://master.php.net/note/delete/112068/in+docs
Del: other reasons-- https://master.php.net/note/delete/112068
Reject -- https://master.php.net/note/reject/112068
Search -- https://master.php.net/manage/user-notes.php