Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79000 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46460 invoked from network); 19 Nov 2014 15:07:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2014 15:07:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 78.32.209.33 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 78.32.209.33 freshmint.phcomp.co.uk Received: from [78.32.209.33] ([78.32.209.33:52181] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/65-15892-422BC645 for ; Wed, 19 Nov 2014 10:07:16 -0500 Received: from addw by mint.phcomp.co.uk with local (Exim 4.72) (envelope-from ) id 1Xr6qf-0005Rm-Gr for internals@lists.php.net; Wed, 19 Nov 2014 15:07:13 +0000 Date: Wed, 19 Nov 2014 15:07:13 +0000 To: internals@lists.php.net Message-ID: <20141119150713.GY2294@phcomp.co.uk> Mail-Followup-To: internals@lists.php.net References: <546C9E22.6090301@fedoraproject.org> <20141119134632.GV2294@phcomp.co.uk> <546CA8C0.1060707@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Parliament Hill Computers Ltd User-Agent: Mutt/1.5.20 (2009-12-10) Subject: Re: [PHP-DEV] [RFC] Remove PHP 4 Constructors From: addw@phcomp.co.uk (Alain Williams) 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