|
Posted by gosha bine on 05/07/07 13:22
Vince Morgan wrote:
> "gosha bine" <stereofrog@gmail.com> wrote in message
> news:463efba6$0$2889$6e1ede2f@read.cnntp.org...
>> Vince Morgan wrote:
>
>>>> Are you debugging with E_ALL? This actually should throw a notice
> ("only
>>>> variables can be returned by ref" or similar).
>>> Yes Gosha. No warning or notice however.
>>>
>>> Vince
>>>
>>>
>> Report a bug then. For reference, the followin throws a notice in php 5.2:
>>
>> function &foo($rc) {
>> return mysql_fetch_array($rc);
>> }
>> $rc = mysql_query("SELECT 1");
>> $a = foo($rc);
>> // NOTICE: Only variable references should be returned by reference
>
> I will report it as a bug Gosha.
> The following doesn't report a warning or notice either, which is at least
> consistent;
It does on my system. Before filing a bug, make sure 1) you're using php
5.2.0 or later and 2) you have proper error_reporting and display_errors
settings.
> function &ret()
> {
> return 1+1;
> }
> $d=ret();
> echo ret;
> Output is 2.
>
> Thanks,
> Vince
>
>
>
>
--
gosha bine
extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
Navigation:
[Reply to this message]
|