note 103430 modified in function.extract by danbrown
| From: | danbrown@php.net | Date: | Wed, 13 Apr 2011 00:35:53 +0000 |
| Subject: | note 103430 modified in function.extract by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178784@lists.php.net to get a copy of this message | ||
Warning: in larger php web applications this is not a good choice. Use of this function will not
help maintainability of your code.
please read php warnings about using this on untrusted data:
<?php
$sql=query("SELECT * FROM contact WHERE
contact_id='$invoicedata_clientcontact'");
if ($tmp=fetch_array($sql))
{
extract($tmp);
}
?>
it will create variables that may overwrite other variables and can cause strange behaviour, advise
against using this function if at all possible.
--was--
Warning: in larger php web applications this is not a good choice. Use of this function will not
help maintainability of your code.
please read php warnings about using this on untrusted data:
$sql=query("SELECT * FROM contact WHERE
contact_id='$invoicedata_clientcontact'");
if ($tmp=fetch_array($sql))
{
extract($tmp);
}
it will create variables that may overwrite other variables and can cause strange behaviour, advise
against using this function if at all possible.
http://php.net/manual/en/function.extract.php