Reply to Re: References

Your name:

Reply:


Posted by gosha bine on 05/07/07 10:06

Vince Morgan wrote:
> "gosha bine" <stereofrog@gmail.com> wrote in message
> news:463ee9be$0$2889$6e1ede2f@read.cnntp.org...
>> Vince Morgan wrote:
>>> I guess I don't understand how references work in php;
>>> Calling a class member function below as an example;
>>> function &getRow()
>>> {
>>> return odbc_fetch_array($this->_det);
>>> }
>>> I would expect that I should end up with nothing as there is nothing to
>>> actualy reference.
>> 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


--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация