Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73009 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60933 invoked from network); 8 Mar 2014 21:40:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2014 21:40:18 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.196 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.196 imap4.ox.registrar-servers.com Received: from [192.64.116.196] ([192.64.116.196:52506] helo=imap4.ox.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/02-44862-F3E8B135 for ; Sat, 08 Mar 2014 16:40:16 -0500 Received: from localhost (localhost [127.0.0.1]) by oxmail.registrar-servers.com (Postfix) with ESMTP id 15B19560080; Sat, 8 Mar 2014 16:40:12 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap4.ox.registrar-servers.com Received: from oxmail.registrar-servers.com ([127.0.0.1]) by localhost (imap4.ox.registrar-servers.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8CjuxsuenSTn; Sat, 8 Mar 2014 16:40:11 -0500 (EST) Received: from [192.168.0.8] (unknown [90.203.28.187]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id EDCC056007F; Sat, 8 Mar 2014 16:40:10 -0500 (EST) Content-Type: multipart/alternative; boundary="Apple-Mail=_A795AC2D-A4A3-4DF9-9453-40777D9FECFB" Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) In-Reply-To: Date: Sat, 8 Mar 2014 21:40:07 +0000 Cc: internals Message-ID: <03CFE6C6-0742-4928-BD2B-E9C920E9246A@ajf.me> References: To: Marco Schuster X-Mailer: Apple Mail (2.1874) Subject: Re: [PHP-DEV] Idea: ifdef-like feature to ease userland BC From: ajf@ajf.me (Andrea Faulds) --Apple-Mail=_A795AC2D-A4A3-4DF9-9453-40777D9FECFB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 8 Mar 2014, at 21:36, Marco Schuster wrote: > especially with (radical) userland API changes coming up in PHP6, > might I suggest something like a ifdef feature which turns blocks of > code into comments? Why is that needed? PHP checks function names and arguments at runtime, = not compile-time. You can already do this: if (some_condition) { PHP_5_6_function(); } else { PHP_5_2_function(); } -- Andrea Faulds http://ajf.me/ --Apple-Mail=_A795AC2D-A4A3-4DF9-9453-40777D9FECFB--