Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86787 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45345 invoked from network); 22 Jun 2015 17:27:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jun 2015 17:27:56 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.216.46 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.216.46 mail-vn0-f46.google.com Received: from [209.85.216.46] ([209.85.216.46:36940] helo=mail-vn0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/B4-07834-B9548855 for ; Mon, 22 Jun 2015 13:27:55 -0400 Received: by vnbf129 with SMTP id f129so3595535vnb.4 for ; Mon, 22 Jun 2015 10:27:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=8AT7ijACuGPPCpgOWn8/8iVavEfn4WjhoslNI8BlJl0=; b=LvzbyZbbdurwRk6ZulgHtBiQM6KkKGuQdTvKn3LzN8F3XA50JS5pEqhSs0zWyNDr2W wLsc9hvab+4LkOxkYmvGyLZFzLSBefm9q/Pu5MKjCrW8vQt3LONuEHfp8pU4R9N79Qfb yTR44jHY5Ze2yCTkywB6gdnLFFaKm9m0kH1UQ94lb+kjwFuopzBwL0IHmDsEkt9c9pQj M66z1HhheKGzg+qGT6YgtGGWDur8KftfYRu8gDDRzJlFQOyMXvZzs4mQVWa1abxW4L1P /XvXFd+RRGS2vaMaKhf/L9dZV3xe1Aet5KzhWcoShrgznZalB5SgtR5rPTnh4ybLeGrv kzAg== X-Gm-Message-State: ALoCoQl42y8pqshgLzGFaoc2yQ1Vfu1QM63PW9bSqws+twJ78LCuDKRryLrPkw4SfOHS1rHxI6zpvQ02QzvbjknVZQuuogdcYPsnASZ5OSH6wGydY3GeFF+TmdJwZnOIwuJa1VxuSwq3r8knVXLN9OHvNhxz6vHz0HeMkal2/RItanbY26yfllY= MIME-Version: 1.0 X-Received: by 10.52.35.107 with SMTP id g11mr26055852vdj.37.1434994072436; Mon, 22 Jun 2015 10:27:52 -0700 (PDT) Received: by 10.31.10.201 with HTTP; Mon, 22 Jun 2015 10:27:52 -0700 (PDT) In-Reply-To: <55881A72.4090403@lerdorf.com> References: <5586E5D1.4010901@lerdorf.com> <55870947.4060304@lerdorf.com> <5587334C.2080401@lerdorf.com> <55873676.6050706@gmail.com> <55876B29.90804@lerdorf.com> <55881A72.4090403@lerdorf.com> Date: Mon, 22 Jun 2015 20:27:52 +0300 Message-ID: To: Rasmus Lerdorf Cc: Bob Weinand , Anatol Belski , Kalle Sommer Nielsen , Stanislav Malyshev , Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary=20cf3079c0a4f15b1405191e97d2 Subject: Re: [PHP-DEV] hasType() for internal function parameters? From: dmitry@zend.com (Dmitry Stogov) --20cf3079c0a4f15b1405191e97d2 Content-Type: text/plain; charset=UTF-8 On Mon, Jun 22, 2015 at 5:23 PM, Rasmus Lerdorf wrote: > On 06/22/2015 05:11 AM, Dmitry Stogov wrote: > > Hi Rasmus, > > > > Your latest changes broke more than 100 tests. > > Sorry, but I had to revert your commits and related Bob's fixes. > > You may find them in internal-arg-info branch. > > > > Please, don't do experiments on the common code base at beta stage. > > On the other hand, I don't see a big problem committing this, when a > > complete solution is ready. > > Oops, way more test failures than I expected. But I don't understand > some of them. For example, Zend/tests/constants_008.phpt which is: > > define('a', 2); > const a = 1; > if (defined('a')) { > print a; > } > > With arginfo filled in correctly for define() and defined() the output is: > > ../../sapi/cli/php -derror_reporting=-1 constants_008.php > Notice: Constant a already defined in Zend/tests/constants_008.php on line > 4 > 1 > > And without arginfo: > > php -derror_reporting=-1 constants_008.php > Notice: Constant a already defined in Zend/tests/constants_008.php on line > 4 > 2 > > I wasn't expecting fixing arginfo would change how constants behave. > Actually, when you added type hints, php compiler stopped optimizing and using ZEND_DEFINED (and others) instead of internal function calls, but of course this shouldn't change behavior. I'll need to take a look into difference. Thanks. Dmitry. > > -Rasmus > > --20cf3079c0a4f15b1405191e97d2--