Re: Declare minimum PHP version required?

From: Date: Mon, 03 Feb 2014 11:30:42 +0000
Subject: Re: Declare minimum PHP version required?
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Am 03.02.2014 12:28 schrieb "Patrick Schaaf" <[email protected]>:
> B) it would support testing for constants
>
> declare(const='ADMIN_SERVER') { ... }
> declare(const_false='DEVELOPMENT_SERVER') { ... }
>
> which would really be a plus for us, using MINIT time constants provided
by the defcon extension (http://github.com/infusion/PHP-Defcon)

For this use case it might be useful if an extension could simply extend
declare with additional keywords, and effect that code elision as a
reaction to the keyword / check being used and done at compile time.

best regards
  Patrick


Thread (50 messages)

« previous php.internals (#72082) next »