Re: [RFC] Remove PHP 4 Constructors

From: Date: Thu, 20 Nov 2014 09:43:48 +0000
Subject: Re: [RFC] Remove PHP 4 Constructors
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Wed, 2014-11-19 at 14:33 +0000, Alain Williams wrote:
> How many servers are stuck on PHP 4 ?
> 
> Of those 'stuck' servers, how many have applications still under active
> development ?
> 
> The point is: how many people would get annoyed if PEAR stopped supporting PHP 4 ?

The point about breaking this is *not* PHP 4 compatibility but
compatibility between PECL packages. The name of the constructor method
is part of the API.

Think about code like this in module A:

   class A_class {
       function A_class() { }
   }

and then module B extending this:

   class B_class  extends A_class {
       function B_class() {
           A_class();
       }
   }

I also wonder how Andrea's tool handles more indirect cases (C_class
extends B_class, while B_class has no ctor so C_class calls directly
A_class's ctor)

So I'm -1 on this.

johannes




Thread (115 messages)

« previous php.internals (#79029) next »