Re: petition against registering

From: Date: Tue, 09 Oct 2001 15:23:43 +0000
Subject: Re: petition against registering
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1644@lists.php.net to get a copy of this message
Ivo Jansch wrote: > > > Or let Smarty auto-register functions that are named according to "the > > rules" (that we don't have yet!)? > > That's not easy to write. Oh, yes! Very easy. > You would have to read all source files and > determin what functions there are. As far as I know, it's possible to > check whether a function exists if you know the functionname, but it > isn't possible to get a list of all functions. (That list would be huge, > given the number of standard php functions, so even if it were possible, > it would be slow to do a lookup). get_defined_functions(). Available in PHP4 >=4.0.4. http://www.php.net/manual/en/function.get-defined-functions.php It WILL return a huge list, but execution time would probably not be that gigantic :) The [internal] section is 752 items long, according to the docs online :-o The [user] section returned would probably not be that big, and that's were we will find all our available functions. /Anders

« previous php.smarty.general (#1644) next »