[PHP-DEV] Re: Memory corruptions related to AST patch

2014-09-09 Thread Nikita Popov
On Mon, Sep 8, 2014 at 9:26 AM, Dmitry Stogov dmi...@zend.com wrote: Hi Nikita, On weekend I ran PHP test suite with valgrind and opcache. I noticed few new tests failures, that most probably introduced by AST patch. Bug #21820 ($arr['foo'] generates bogus E_NOTICE, should be E_PARSE)

Re: [PHP-DEV] setcookie() minor BC break - fixes issue #67736

2014-09-09 Thread Dan Ackroyd
How about delaying that warning until the headers are sent? I don't think there would be any benefit to that. The only possible scenarios are: i) People sending duplicate headers by accident. When they see the error, they should fix their code, so the error goes away. ii) People who are

Re: [PHP-DEV] setcookie() minor BC break - fixes issue #67736

2014-09-09 Thread Chris Wright
On 8 September 2014 09:09, Ferenc Kovacs tyr...@gmail.com wrote: On Mon, Sep 8, 2014 at 9:15 AM, Sherif Ramadan theanomaly...@gmail.com wrote: Actually, we shouldn't be doing that all. We should simply just overwrite the header. It wouldn't make much sense to set two headers with the same

Re: [PHP-DEV] [RFC] Implicit isset() in Shorthand Ternary Operator

2014-09-09 Thread rparker
From: Andrey Andreev Sent: ‎Monday‎, ‎September‎ ‎8‎, ‎2014 ‎5‎:‎16‎ ‎PM To: Andrea Faulds Cc: Adam Harvey, Christoph Becker, PHP internals On Tue, Sep 9, 2014 at 3:07 AM, Andrea Faulds a...@ajf.me wrote: On 8 Sep 2014, at 23:58, Adam Harvey ahar...@php.net wrote: +1 on ?? — there's

Re: [PHP-DEV] Re: [INTERNALS-WIN] [PATCH] Microsecond resolution and accuracy on Windows

2014-09-09 Thread Anatol Belski
Hi Matt, On Fri, September 5, 2014 20:05, Matt Wilmas wrote: Hi Anatol, - Original Message - From: Anatol Belski Sent: Tuesday, September 02, 2014 Unfortunately that's not a PR so I cannot comment there directly, so I'd leave a couple of the comments to the code here: It

Re: [PHP-DEV] [RFC] Implicit isset() in Shorthand Ternary Operator

2014-09-09 Thread Rowan Collins
On 09/09/2014 18:08, rpar...@yamiko.org wrote: I agree and think we should go with a different operator as others suggested. If not ?? than we could use ?= like $foo ?= “default string”. That reads like an assignment, rather than an expression - particularly given PHP's large number of

[PHP-DEV] pack() and unpack() 64 bit format codes

2014-09-09 Thread Leigh
Hi Internals, I would like to propose giving pack() and unpack() 64 bit format codes, mimicking the current behaviour of 32 bit format codes. Pack and unpack are obviously functions inspired by Perl, which has the 64 bit format codes 'q' and 'Q'. So the first half of my proposal is to give

[PHP-DEV] make casts more strict in PHP 7

2014-09-09 Thread Robert Stoll
Heya, I remember that some people were complaining about the inconsistencies between normal conversions and the one applied in Andrea's RFC about Scalar Type Hinting With Casts. https://wiki.php.net/rfc/scalar_type_hinting_with_cast As an example: $i = (int) a; //fine without errors function

Re: [PHP-DEV] pack() and unpack() 64 bit format codes

2014-09-09 Thread Andrea Faulds
On 9 Sep 2014, at 19:36, Leigh lei...@gmail.com wrote: Hi Internals, I would like to propose giving pack() and unpack() 64 bit format codes, mimicking the current behaviour of 32 bit format codes. What would this do on 32-bit platforms? Pack and unpack are obviously functions inspired by

Re: [PHP-DEV] make casts more strict in PHP 7

2014-09-09 Thread Andrea Faulds
On 9 Sep 2014, at 20:26, Robert Stoll p...@tutteli.ch wrote: Personally, I do not like such inconsistencies either but I like that the conversion rules in Andrea's RFC are more strict. And thus I was asking myself if it would not make sense to change the current behaviour of castings and

Re: [PHP-DEV] pack() and unpack() 64 bit format codes

2014-09-09 Thread Leigh
On 9 September 2014 21:16, Andrea Faulds a...@ajf.me wrote: Why is there no big/little-endian signed long long? Because there is no big/little-endian signed long :) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] pack() and unpack() 64 bit format codes

2014-09-09 Thread Leigh
On 9 September 2014 21:16, Andrea Faulds a...@ajf.me wrote: Why is there no big/little-endian signed long long? I suppose you could argue that these count i - signed integer (machine dependent size and byte order) I - unsigned integer (machine dependent size and byte order) However they

[PHP-DEV] Remove alternative PHP tags

2014-09-09 Thread Nikita Popov
Hi internals! I've created a small RFC proposing the removal of the alternative PHP opening/closing tags: https://wiki.php.net/rfc/remove_alternative_php_tags It removes % and script language=php and the other variations of asp and script tags. Nikita

Re: [PHP-DEV] make casts more strict in PHP 7

2014-09-09 Thread Stas Malyshev
Hi! No, no it would not. PHP’s explicit casts cannot fail, and there is absolutely no good reason to change this. If people want strict casting, we can add new functions or operators for that specifically. But to break explicit casts and make them sometimes fail would cause innumerable bugs

Re: [PHP-DEV] Remove alternative PHP tags

2014-09-09 Thread Leigh
On 9 September 2014 23:08, Nikita Popov nikita@gmail.com wrote: Hi internals! I've created a small RFC proposing the removal of the alternative PHP opening/closing tags: https://wiki.php.net/rfc/remove_alternative_php_tags It removes % and script language=php and the other

Re: [PHP-DEV] Remove alternative PHP tags

2014-09-09 Thread Andrea Faulds
On 9 Sep 2014, at 23:08, Nikita Popov nikita@gmail.com wrote: I've created a small RFC proposing the removal of the alternative PHP opening/closing tags: https://wiki.php.net/rfc/remove_alternative_php_tags It removes % and script language=php and the other variations of asp and

Re: [PHP-DEV] Remove alternative PHP tags

2014-09-09 Thread Andrea Faulds
On 10 Sep 2014, at 01:21, Andrea Faulds a...@ajf.me wrote: Isn’t this a bit of a needless BC break? Not very nice on people with such codebases. It’s also worth pointing out that people might be using these to get around the XML ? issue (granted, you can disable short tags). I’d vote for

Re: [PHP-DEV] make casts more strict in PHP 7

2014-09-09 Thread Mike Willbanks
Hi! No, no it would not. PHP’s explicit casts cannot fail, and there is absolutely no good reason to change this. If people want strict casting, we can add new functions or operators for that specifically. But to break explicit casts and make them sometimes fail would cause innumerable

[PHP-DEV] Deprecated functions

2014-09-09 Thread Tjerk Meesters
Hi, When I was fixing test cases on my `kill-ereg` branch I noticed a Reflection test case for `ReflectionFunction::isDeprecated()`. The problem with such a test case is that you’d be chasing deprecated functions to tests against as we move along; this is the current list of deprecated

Re: [PHP-DEV] Deprecated functions

2014-09-09 Thread Levi Morrison
On Tue, Sep 9, 2014 at 11:42 PM, Tjerk Meesters tjerk.meest...@gmail.com wrote: Hi, When I was fixing test cases on my `kill-ereg` branch I noticed a Reflection test case for `ReflectionFunction::isDeprecated()`. The problem with such a test case is that you’d be chasing deprecated

Re: [PHP-DEV] Deprecated functions

2014-09-09 Thread Alexander Lisachenko
Hi! Maybe it will be better to do this in another way: introduce an RFC to add 'deprecated' keyword into the syntax like 'final' or 'protected'. There are many frameworks that want to deprecate some methods or classes. Currently it's only possible via @deprecated tag in the phpDoc-block, but this