Reply to RE: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

Your name:

Reply:


Posted by "Michael Sims" on 09/20/05 19:25

Rasmus Lerdorf wrote:
> Michael Sims wrote:
>> When used as an expression, an assignment evaluates to whatever is
>> on the right side of the assignment operator, not the left.
>> Example:
[...]
>> foo($a = 5);
>> and
>> foo(5);
>>
>> are exactly the same...
>
> The value passed is the same, but when passed as $a=5 then the value
> has a symbol table entry associated with it whereas if you just pass
> in 5 it doesn't. That means that:
>
> function foo(&$arg) { $arg =6; }
>
> will work if you call: foo($a=5);
> but you will get an error if you have: foo(5);

Oops, sorry for posting misinformation, I was not aware of the above... Thanks for the info.

[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

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