Re: ref fix revisited
| From: | Derick Rethans | Date: | Wed, 14 Sep 2005 13:40:55 +0000 |
| Subject: | Re: ref fix revisited | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18890@lists.php.net to get a copy of this message | ||
On Wed, 14 Sep 2005, Andreas Ahlenstorf wrote:
> Fatal error: Only variables can be passed by reference in /home/www/
> core/media.class.php on line 221
The following script works fine too:
<?php
$filename = sprintf('%s.%s', md5(uniqid(rand(), true)), array_pop(explode('.',
$name)));
echo $filename;
?>
echos:
derick@kossu:~$ php-4.4dev -derror_reporting=2047 /tmp/test.php
Notice: Undefined variable: name in /tmp/test.php on line 2
fb34401012d0b75111d002206cb8d349.
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org