Re: Declare minimum PHP version required?

From: Date: Mon, 03 Feb 2014 18:14:56 +0000
Subject: Re: Declare minimum PHP version required?
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-72093@lists.php.net to get a copy of this message
On Sun, Feb 2, 2014 at 10:58 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > I thought it might be good for us to have declaring minimum PHP version > required to execute script. > http://jp1.php.net/manual/en/control-structures.declare.php > > Something like > <?php > declare(php_version>='5.6.0'); > // or PHP_VERSION_ID? using = as minimum as it could be a little faster > // and no change in declare() syntax. > declare(php_version=50600); > While I like it from a formality stand-point, I have to agree with Stas. The is entirely doable as PHP code right now. Include time IS execute time. And if you're concerned with a single integer compare in your perf analysis, you're probably worried about the wrong thing. -Sara

« previous php.internals (#72093) next »