Re: [PHP-DEV] builtin functions / constructs

2001-03-23 Thread Stefan Livieratos
Hi, "Cynic" [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is there a way to get names of available "language constructs" in a PHP program? I mean, I don't think there's currently a way a PHP script can know if e. g. zend_version() is available (other

Re: [PHP-DEV] builtin functions / constructs

2001-03-23 Thread Hartmut Holzgraefe
Stefan Livieratos wrote: Hi, "Cynic" [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is there a way to get names of available "language constructs" in a PHP program? I mean, I don't think there's currently a way a PHP script can know if e. g.

Re: [PHP-DEV] builtin functions / constructs

2001-03-23 Thread Zeev Suraski
What's the point of returning the language constructs though? By definition, each of them has its own semantics, so I can't see any use for that... Zeev At 15:08 23/3/2001, Hartmut Holzgraefe wrote: Stefan Livieratos wrote: Hi, "Cynic" [EMAIL PROTECTED] schrieb im Newsbeitrag

Re: [PHP-DEV] builtin functions / constructs

2001-03-23 Thread Hartmut Holzgraefe
Stefan Livieratos wrote: "Hartmut Holzgraefe" [EMAIL PROTECTED] schrieb im Newsbeitrag does this return things like unset()? no it doesn't! there's a difference between builtin functions and language constructs You are right of course. I was misled by the example Cynic used. On the

Re: [PHP-DEV] builtin functions / constructs

2001-03-23 Thread Cynic
At 16:12 23.3. 2001, Hartmut Holzgraefe wrote the following: -- Stefan Livieratos wrote: "Hartmut Holzgraefe" [EMAIL PROTECTED] schrieb im Newsbeitrag there's a difference between builtin functions and language constructs You are

Re: [PHP-DEV] builtin functions / constructs

2001-03-23 Thread Zeev Suraski
unset() is not a function, and using it has very different semantics than a function call (e.g., you can't use unset() as a part of a bigger expression, but only as a full 'unset();' statement). There aren't too many built-in constructs that behave exactly like functions, as a matter of

Re: [PHP-DEV] builtin functions / constructs

2001-03-23 Thread Zeev Suraski
At 18:20 23/3/2001, Cynic wrote: As for the sensible purpose: I'm writing phLXR. It's like LXR, except it's written in PHP, for PHP programs, and (me being still firmly rooted in the NT world) with portability in mind - no Glimpse. I want the internal PHP stuff (be it a function, a "language

Re: [PHP-DEV] builtin functions / constructs

2001-03-23 Thread Hartmut Holzgraefe
Zeev Suraski wrote: The language constructs PHP supports aren't a moving target, so there's no much sense in having a function that returns them. You should be quite safe hardcoding these constructs in your application. it should be even more save to hardcode them in PHP itself -- Hartmut

Re: [PHP-DEV] builtin functions / constructs

2001-03-23 Thread Phil Driscoll
it should be even more save to hardcode them in PHP itself sticking nose in where it's not wanted ...or better still not to have language constructs at all so that everything that looks like a function also works like a function. /sticking nose in where it's not wanted :) -- Phil Driscoll Dial

Re: [PHP-DEV] builtin functions / constructs

2001-03-23 Thread Zeev Suraski
At 18:49 23/3/2001, Hartmut Holzgraefe wrote: Zeev Suraski wrote: The language constructs PHP supports aren't a moving target, so there's no much sense in having a function that returns them. You should be quite safe hardcoding these constructs in your application. it should be even more

Re: [PHP-DEV] builtin functions / constructs

2001-03-23 Thread Zeev Suraski
There's no real motivation to do that actually. These constructs are very unique, and the fact they have construct-specific syntax doesn't have any negative impact, as it's still within the standard syntax rules of PHP (all but echo, which is a remnant of PHP/FI 2, and perhaps it was a