Re: how to include() a string

From: Date: Mon, 30 Apr 2001 12:25:38 +0000
Subject: Re: how to include() a string
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-50840@lists.php.net to get a copy of this message
At 18:13 29/4/2001, Luca wrote:
If you can develop your application without using eval() you're better off as it is very slow.
So, can think of faster solutions?
This only applies to using eval() as a 'mainstream' programming technique (e.g., instead of using other language features such as indirect reference, etc.). If what you have to do is execute code in a string, then eval() is exactly what you want. eval() in PHP 4.0 is very similar to include(), and is pretty much the same thing, except the code is not read from a file, but from a string (it used to be considerably worse than include() in PHP 3.0). Zeev

« previous php.general (#50840) next »