Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72093 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90387 invoked from network); 3 Feb 2014 18:15:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2014 18:15:01 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.192.170 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.192.170 mail-pd0-f170.google.com Received: from [209.85.192.170] ([209.85.192.170:57375] helo=mail-pd0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/19-35654-3ACDFE25 for ; Mon, 03 Feb 2014 13:15:00 -0500 Received: by mail-pd0-f170.google.com with SMTP id p10so7206466pdj.1 for ; Mon, 03 Feb 2014 10:14:56 -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=NgBTScClDc2scM68TmdMlp0rPOlAfLYtIbRX7HpwkSQ=; b=Ki0lgAmTJ8m90nGmfm81IURjUoT7UgZrUC6YEhiZhO8GbpbNEumOySJgo1dNhUNQH3 Dp2KIV6S4QbjQpV/2NKxRgX61z5naOaduBIpoEhL3ccVvyhQgKEXzrM1r+Ulqtc4TPTT VLcBfCuCxvxCZexQYK/aIzpgmHAOqiV4yA8AYOpl7xmT3coZZ7VSpBEWl/xxhN2gbwix qANJp1pT5WLJl6iwJrh8ie11IiHe5tmH4IwliftCZZAiKn4WZj9831dFn5CbOhhVSPiM Qp8+dnl1ppGuiq9HkahDgn86om0X9VBksNIWZE/uf2/1HHWwZ8SAtT23bfU6j4Tayuew BAsA== X-Gm-Message-State: ALoCoQmgky4bqwSbB13yo5KerGAay10IrkNJBeMs2eefmVhDGe+IHeA7FRmAEZehBna3CXE/5bqR MIME-Version: 1.0 X-Received: by 10.68.196.195 with SMTP id io3mr39341559pbc.6.1391451296832; Mon, 03 Feb 2014 10:14:56 -0800 (PST) Sender: php@golemon.com Received: by 10.70.38.234 with HTTP; Mon, 3 Feb 2014 10:14:56 -0800 (PST) X-Originating-IP: [2620:0:1cfe:18:22c9:d0ff:fe87:295b] In-Reply-To: References: Date: Mon, 3 Feb 2014 10:14:56 -0800 X-Google-Sender-Auth: n392Wv5CFEfqjjP7I2o30qVwzhE Message-ID: To: Yasuo Ohgaki Cc: "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Declare minimum PHP version required? From: pollita@php.net (Sara Golemon) On Sun, Feb 2, 2014 at 10:58 PM, Yasuo Ohgaki wrote: > I thought it might be good for us to have declaring minimum PHP version > required to execute script. > http://jp1.php.net/manual/en/control-structures.declare.php > > Something like > declare(php_version>='5.6.0'); > // or PHP_VERSION_ID? using = as minimum as it could be a little faster > // and no change in declare() syntax. > declare(php_version=50600); > While I like it from a formality stand-point, I have to agree with Stas. The is entirely doable as PHP code right now. Include time IS execute time. And if you're concerned with a single integer compare in your perf analysis, you're probably worried about the wrong thing. -Sara