You are here: Re: [PHP] Only variables can be passed by reference - Preg_match Fatal error « PHP « IT news, forums, messages
Re: [PHP] Only variables can be passed by reference - Preg_match Fatal error

Posted by Richard Lynch on 01/17/05 05:24

Adrian wrote:
> check your preg_match() call...
>
> things like "$pattern" and "$msg" are the spawn of satan btw.
> there is ABSOLUTELY NO REASON to put variables in quotation marks
> except that php has to parse the string which is slower than php just
> seeing the variable.

You'd be hard-pressed to measure a difference, I suspect.

It *IS* a bad thing stylsticly.

> and when a functions expects a reference, "$variable" will cause a
> fatal error like it happens in your script.

Ouch.

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this 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

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