Re: Declare minimum PHP version required?

From: Date: Mon, 03 Feb 2014 19:57:41 +0000
Subject: Re: Declare minimum PHP version required?
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi Stas,

On Tue, Feb 4, 2014 at 4:42 AM, Stas Malyshev <[email protected]>wrote:

> > There are many code out there checks if (!extention_loaded(foo'))
> die('You
> > need foo'). This is waste of CPU resources once it is checked. These
> > requirements for scripts may be evaluated at compile time and script
> runs a
> > little faster.
>
> Managing requirements is a job for package manager, like composer, not
> language compiler, IMO.


I agree that good package manager should manage requirements. However, once
code is installed, package manager will not check requirements. (Package
manager could be made to execute requirement checks at any time, though)
Therefore, there would be developers embed environmental checks to make
sure not to die with function not found, etc.

In addition to this, there would be SCL for RHEL7 and there are some tools
like phpenv. Installing PHP does not have to be executing PHP. Even if
there is good package manager, compile time requirement check is nice to
have. It's nice to have and it's not must have, though.

Regards,

--
Yasuo Ohgaki
[email protected]


Thread (50 messages)

« previous php.internals (#72111) next »