Re: Only variables can be passed by reference - Preg_match Fatal error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux