Reply to Re: trying to pass by reference to an optional function parameter

Your name:

Reply:


Posted by Oli Filth on 10/07/56 11:18

John T said the following on 10/06/2005 21:52:
>
>>It doesn't make a whole lot of sense to have a reference to nothing.
>
> It's not the nothing that it's objecting to, it is not legal to have any
> default value for a parameter passed by reference.
>

Yes, by definition passing a reference means that you're passing a
pointer to an existing variable. If that variable doesn't exist, there
is nothing to set to NULL if you do something like:

function funQueryDatabase($strQuery, &$intInsertId = NULL)

So by definition this doesn't make sense.

--
Oli

[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

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