Re: [RFC] Remove PHP 4 Constructors

From: Date: Wed, 19 Nov 2014 15:07:13 +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, Nov 19, 2014 at 02:41:09PM +0000, Chris Wright wrote:


> Note that, for users who are insane enough to expect to maintain PHP4-7
> support in a single codebase, it's also easily possible to work with both
> styles even after this change is introduced:
> ...

It is a problem trying to maintain code for different versions of PHP,
especially where there are syntax differences. It would be really nice to have
some sort of conditional compilation as in C. Eg:

It would be nice to be able to do something like:

try {
 ....

# if PHP_VERSION_ID > 50500
} catch(PDOException $e) {
  ....
} finally {
   ... tidy up
}
# else
} catch(PDOException $e) {
  ... tidy up not quite where I want it
  ....
}
# endif

OK: '#' might not be a good character since it is start of comment, but that is
the idea.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>


Thread (115 messages)

« previous php.internals (#79000) next »