Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73018 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77328 invoked from network); 8 Mar 2014 23:44:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2014 23:44:57 -0000 Authentication-Results: pb1.pair.com header.from=marco@m-s-d.eu; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=marco@m-s-d.eu; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain m-s-d.eu from 209.85.223.181 cause and error) X-PHP-List-Original-Sender: marco@m-s-d.eu X-Host-Fingerprint: 209.85.223.181 mail-ie0-f181.google.com Received: from [209.85.223.181] ([209.85.223.181:60968] helo=mail-ie0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/55-44862-87BAB135 for ; Sat, 08 Mar 2014 18:44:57 -0500 Received: by mail-ie0-f181.google.com with SMTP id tp5so5567561ieb.26 for ; Sat, 08 Mar 2014 15:44:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=O4WFBFKLUgDk24pSU+dDt5CcW+9/8BbMYmQYX0kvZcQ=; b=aWfEnw+Jqt0F8a6Vow/AKB6ALfhC3L9kMbyeifJrawcO7ExqyWMkaZV6i/tt9LBVZp HQuUJZp4uLWGdqgknRXf47wJ9Vv7OzrbyR8TdEA6zziOceA+N24GH57BG8eS534YH9hU P8W00vDVmMlhwcC1ul4e5aT7rvjCnB0+/jaITNek7yixSdVe9rdGiYIuZolMGtT3s8Z1 kbHk67pWH76UFYiC3mEDvWm2m+OpfnhK+jvukZppTVR1npROk/IYXnOQM6NXVgdoezwJ lbA5pH3YJUMv7QvrkIi1lJpvBp59V2uRrzBqhqyzbpVDePXLUrgFQOrPvRSCphUZe7Xx BOCQ== X-Gm-Message-State: ALoCoQk/sHBhslgM84J8lsKQn5ItlMkw/iVXYY1+BSS3Z2OGTnpWSxcr9SRkggM4WSSnD5Kkx9eK MIME-Version: 1.0 X-Received: by 10.42.250.132 with SMTP id mo4mr21583722icb.34.1394322294197; Sat, 08 Mar 2014 15:44:54 -0800 (PST) Sender: marco@m-s-d.eu Received: by 10.64.165.166 with HTTP; Sat, 8 Mar 2014 15:44:54 -0800 (PST) X-Originating-IP: [84.153.66.192] In-Reply-To: References: <03CFE6C6-0742-4928-BD2B-E9C920E9246A@ajf.me> <29BDF40C-562D-4943-877B-70701335D3AA@ajf.me> Date: Sun, 9 Mar 2014 00:44:54 +0100 X-Google-Sender-Auth: g2S4WVRUqP1VYi8zAeB93lD3_pA Message-ID: To: Arvids Godjuks Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Idea: ifdef-like feature to ease userland BC From: marco+php@m-s-d.eu (Marco Schuster) Hi, On Sun, Mar 9, 2014 at 12:41 AM, Arvids Godjuks wrote: > Hello Internals. > > This really sounds strange. Why? Because you already have all the tools in > userland to do all that since like PHP 4. > > You have "function_exists" > http://lv.php.net/manual/en/function.function-exists.php , you have > "phpversion" http://lv.php.net/manual/en/function.phpversion.php, you have > PHP_VERSION_ID constant (details about the constant are in > http://lv.php.net/manual/en/function.phpversion.php too), you have > version_compare http://lv.php.net/manual/en/function.version-compare.php > > Sometimes you just need to look up the actual manual... This helps against API-layer changes, but once you try out new syntax features (not just yield/goto, but I have stuff like named parameters or that argument unpacking stuff in mind), then you need a parse-time filter so that older PHP versions do not cough up on syntax errors. Marco