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
fact, I don't think there are any. The ones that come close:
- isset() and empty() - their different semantics is that they won't
display a warning when fed a non existent argument (regardless of error
reporting).
- print, include, require - do not require parentheses
- echo - does not require parentheses, and still accepts a coma-separated
list of arguments
At 17:12 23/3/2001, Hartmut Holzgraefe wrote:
>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
> > other hand I don't know how useful a function that returns all
> > language constructs would be. Could someone give me an example for
> > using such a function in a sensible way?
>
>i just wanted to show that there are things that look like functions
>but aren't
>
>i'd suggest that those few should be added to the result of
>get_defined_functions, either under 'internal' or as a third
>block 'constructs'
>
>--
>Hartmut Holzgraefe [EMAIL PROTECTED] http://www.six.de +49-711-99091-77
>
>Besuchen Sie uns auf der CeBIT 2001 - in Halle 6 Stand F62/4
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
Zeev Suraski <[EMAIL PROTECTED]>
CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]