Re: [PHP4BETA] cvs: php4 / php.h /ext/standard/ basic_functions.c crypt.c datetime.c dl.h dns.c file.c microtime.c php_crypt.h

[email protected] (Zeev Suraski)
Newsgroups php.version4
Message-ID <[email protected]>
On Fri, 26 May 2000, Andrei Zmievski wrote:

> On Fri, 26 May 2000, Hartmut Holzgraefe wrote:
> > have a new function like
> > 
> >   PHP_FUNCTION(warn_not_available)
> >   {  
> >     php_error(E_WARNING, "%s() is  not supported in this PHP
> > build",get_active_function_name()); 
> >     RETURN_FALSE;
> >   }
> > 
> > and function_entries like 
> > 
> >   /* functions from crypt.c */
> >   #ifdef HAVE_CRYPT
> >   	PHP_FE(crypt, NULL)
> >   #else
> > 	PHP_FALIAS(crypt, warn_not_available, NULL)
> >   #endif
> 
> That's a better idea. But then warn_not_available() becomes exposed to
> user-space...

Why?  It doesn't...

BTW, even though we'll be dropping this solution altogether, if you ever
write macros that have side effects (as opposed to just being a value),
please make sure you use a notation of 
	FOO();
instead of just
	FOO;

It makes the code more readable.

Zeev


-- 
Zeev Suraski <[email protected]>
http://www.zend.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.