Re: Re: PHP & XML

From: Date: Sat, 08 Dec 2001 17:32:53 +0000
Subject: Re: Re: PHP & XML
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-72944@lists.php.net to get a copy of this message
At 11:50 AM 12/8/2001 +0100, Stig S. Bakken wrote:
Rasmus Lerdorf wrote:
Guys, relax. No, this does not work. The only reason your example
works
is because min() is a built-in PHP function already.
man now i am crushed... i knew it wouldn't work - that's why i never tried. i was so amazed when i tried that i must have been blind to
the fact
that i chose a bad example... has anyone every thought of adding such a thing? the dev team can
surely
appreciate it because #defined macros are all over the php source.
You can use create_function() to do something like that. See http://php.net/create_function Or simply make a function. The point of macros in a language like C is that they are processed before compilation and a real function call is avoided. This does not apply to a non-compiled language like PHP so there is no reason not to simply create a PHP-level function if you want something like that. You mean a non-precompiled language like PHP. Technically speaking, PHP has been compiling for a while.
I wouldn't call PHP a compiled language. It's basically still an interpreter like Perl & Python. Andi

« previous php.dev (#72944) next »