Re: [PHP-DEV] Translating optional zval ** with zend_parse_parameters() to PHP 7

2016-11-25 Thread Thomas Hruska
On 11/25/2016 4:32 PM, Jakub Zelenka wrote: On 25 Nov 2016 20:43, "Kalle Sommer Nielsen" wrote: 2016-11-25 13:30 GMT+01:00 Thomas Hruska : I need to be able to *modify* the original variable that was passed in. I already use "|l" and zend_long

Re: [PHP-DEV] Translating optional zval ** with zend_parse_parameters() to PHP 7

2016-11-25 Thread Jakub Zelenka
On 25 Nov 2016 20:43, "Kalle Sommer Nielsen" wrote: 2016-11-25 13:30 GMT+01:00 Thomas Hruska : > I need to be able to *modify* the original variable that was passed in. I already use "|l" and zend_long > elsewhere in the extension Ah my bad I misread it!

[PHP-DEV] Translating optional zval ** with zend_parse_parameters() to PHP 7

2016-11-25 Thread Weirdan
In that case take a look at where such is implemented in php-src, dns_get_record() is an example despite the slightly clouded code: http://git.php.net/?p=php-src.git;a=blob;f=ext/standard/dns.c;h=f92015eee90d3e93a801e93d6381d89923825166;hb=refs/heads/master#l1011 dns_get_record (as opposed to

Re: [PHP-DEV] Translating optional zval ** with zend_parse_parameters() to PHP 7

2016-11-25 Thread Kalle Sommer Nielsen
2016-11-25 13:30 GMT+01:00 Thomas Hruska : > I need to be able to *modify* the original variable that was passed in. I > already use "|l" and zend_long > elsewhere in the extension Ah my bad I misread it! In that case take a look at where such is implemented in

Re: [PHP-DEV] Re: number_format() = "-0.00"

2016-11-25 Thread Nikita Nefedov
> On 25 Nov 2016, at 21:07, David Rodrigues wrote: > > As reference, I'll put here what some languages does on this case: > > Java:-0.00 (http://ideone.com/NOxen1) > Python: -0.00 (http://ideone.com/llxGHA) > Ruby:-0.00 (http://ideone.com/j3KgMd) > C++14:

Re: [PHP-DEV] Encouraging maintaining the language spec

2016-11-25 Thread Stanislav Malyshev
Hi! > If I edited the RFC template to mention having a language specification > patch, would anyone object? Great idea, than you for adding it! -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] ArrayIterator improvements

2016-11-25 Thread Wes
2016-11-25 19:27 GMT+01:00 Stanislav Malyshev : > > Now the RFC says " if the given key is present in the array the method > would successfully return null". While technically in PHP not returning > value and returning NULL is the same thing, I'd just omit the whole > return

Re: [PHP-DEV] [RFC] ArrayIterator improvements

2016-11-25 Thread Stanislav Malyshev
Hi! > Hello PHPeeps, I've updated the RFC! Have a look at it, please! (Sorry for > the engrish) Now the RFC says " if the given key is present in the array the method would successfully return null". While technically in PHP not returning value and returning NULL is the same thing, I'd just omit

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-25 Thread Stanislav Malyshev
Hi! > Sorry, but yes. > > http://wiki.php.net/rfc/voting > >> There'd be a minimum of 2 weeks between when an RFC that touches the > language is brought up on this list and when it's voted on is required. > Other RFCs might use a smaller timeframe, but it should be at least a week. I must say

Re: [PHP-DEV] Re: number_format() = "-0.00"

2016-11-25 Thread David Rodrigues
As reference, I'll put here what some languages does on this case: Java:-0.00 (http://ideone.com/NOxen1) Python: -0.00 (http://ideone.com/llxGHA) Ruby:-0.00 (http://ideone.com/j3KgMd) C++14: -0.00 (http://ideone.com/P3WdoJ) Node.js: -0.00 (http://ideone.com/31gQgV - v0.12)

[PHP-DEV] Re: number_format() = "-0.00"

2016-11-25 Thread Craig Duncan
On 25 November 2016 at 07:54, Craig Duncan wrote: > I've submit a PR (https://github.com/php/php-src/pull/2220) to fix a bug ( > https://bugs.php.net/bug.php?id=73581). > It sounds like opinions are divided on this, I'll draft an RFC including the other instances Christoph

Re: [PHP-DEV] Introduction

2016-11-25 Thread Tobias Nyholm
I would of course not plan a new summer of code. That is, as you say, a huge project. I’ll just make sure the Wiki is up to date. The heading "Current happenings (2010)” is quite sad to see. Regards Tobias Nyholm From: Kalle Sommer Nielsen Reply: Kalle Sommer

Re: [PHP-DEV] PHP 5.6.29 RC1 is available for testing

2016-11-25 Thread Dennis Clarke
On 11/24/2016 07:07 PM, Ferenc Kovacs wrote: Hello everyone, PHP 5.6.29 RC1 was just released and can be downloaded from: http://downloads.php.net/~tyrael/ Compiles fine on a Solaris 10 system with the Oracle Studio 12.5 tools. Not C99 of course but still, a very POSIX tight system. Running

[PHP-DEV] UGLY Benchmark Results for PHP Master 2016-11-25

2016-11-25 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-11-25 06:26:32+02:00 commit: 5af586b previous commit:b6068f6 revision date: 2016-11-24 22:39:39+01:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

Re: [PHP-DEV] How to handle error in sapi

2016-11-25 Thread Zheng SHAO
> php_apache_sapi_read_post() is invoked very early on > (php_module_startup > sapi_activate > sapi_read_post_data), and > therefore we are too early at initialization that you cannot really > throw an exception to the user. What you can do however is to call > php_apache_sapi_log_message() and

Re: [PHP-DEV] Translating optional zval ** with zend_parse_parameters() to PHP 7

2016-11-25 Thread Thomas Hruska
On 11/25/2016 12:27 AM, Kalle Sommer Nielsen wrote: Hi Thomas 2016-11-25 4:13 GMT+01:00 Thomas Hruska : I'm working on updating an extension for PHP 7 compatibility. I have one function that uses an optional zval ** with zend_parse_parameters(). zval

[PHP-DEV] Re: Binary string forward compatibility removal

2016-11-25 Thread Pedro Magalhães
On 2016-11-06 20:22, Pedro Magalhães wrote: Hi internals, I've created a PR (https://github.com/php/php-src/pull/2187) aiming at the removal of the binary string forward compatibility. Reproducing the description of the PR: In version 5.2.1, the b prefix and the (binary) cast were

Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Nikita Nefedov
On Fri, 25 Nov 2016 11:10:47 +0300, Rasmus Lerdorf wrote: On Thu, Nov 24, 2016 at 11:54 PM, Craig Duncan wrote: I've submit a PR (https://github.com/php/php-src/pull/2220) to fix a bug ( https://bugs.php.net/bug.php?id=73581). Kalle suggested I

[PHP-DEV] Re: number_format() = "-0.00"

2016-11-25 Thread Christoph M. Becker
On 25.11.2016 at 08:54, Craig Duncan wrote: > Hi internals, > > I've submit a PR (https://github.com/php/php-src/pull/2220) to fix a bug ( > https://bugs.php.net/bug.php?id=73581). > > Kalle suggested I run the change by here to see if there are any concerns > or feedback about merging this? I

Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Alex Bowers
Php doesn't have a concept of negative zero except in a string instance. And the main use case for this is displaying the number as a string which has very few real world use cases as being a negative zero. On 25 Nov 2016 9:05 am, "Craig Duncan" wrote: > On 25 November 2016

Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Craig Duncan
On 25 November 2016 at 08:58, Sherif Ramadan wrote: > I'm pretty sure this is covered by the language reference [ > http://php.net/language.types.float] as per precision of floating point > numbers in PHP. Though I don't see much harm in adding a note with > references

Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Sherif Ramadan
I'm pretty sure this is covered by the language reference [ http://php.net/language.types.float] as per precision of floating point numbers in PHP. Though I don't see much harm in adding a note with references there to the documentation for number_format(), if that's what you meant. On Fri, Nov

Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Craig Duncan
On 25 Nov 2016 08:11, "Rasmus Lerdorf" wrote: > > This doesn't seem like a bug to me. Our floating point is all IEEE 754 and as per IEEE 754 -0.00 is the correct and expected result here. I've just read the link below and I'm inclined to agree on the technical reasoning.

Re: [PHP-DEV] number_format() = "-0.00"

2016-11-25 Thread Rasmus Lerdorf
On Thu, Nov 24, 2016 at 11:54 PM, Craig Duncan wrote: > I've submit a PR (https://github.com/php/php-src/pull/2220) to fix a bug ( > https://bugs.php.net/bug.php?id=73581). > > Kalle suggested I run the change by here to see if there are any concerns > or feedback about