Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Yasuo Ohgaki
On Thu, Dec 8, 2016 at 10:02 AM, Yasuo Ohgaki wrote: > Please note that users cannot write clean/efficient user defined > serializer without this RFC. It may be better to explain real working code. Since I added "php_serialize" to recent PHP, user defined serialization with current API became a

[PHP-DEV] Re: Internal function/method data type validation practice?

2016-12-07 Thread Yasuo Ohgaki
On Thu, Dec 8, 2016 at 10:34 AM, Yasuo Ohgaki wrote: > > What's the best practice of internal function and method data type > validation, both parameter and return types? Sorry, question is confusing. I'm trying to validate data types of callbacks which could be both user defined and internal fun

[PHP-DEV] Internal function/method data type validation practice?

2016-12-07 Thread Yasuo Ohgaki
Hi all, What's the best practice of internal function and method data type validation, both parameter and return types? Although it seems it is possible to retrieve parameter/return types, there is no APIs defined in Zend according to ext/reflection or I must have missed something. Thank you. -

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Yasuo Ohgaki
Hi Bob, Thank you for feedback! On Thu, Dec 8, 2016 at 7:44 AM, Bob Weinand wrote: > We can just directly read from $_SESSION (in write) and use session_encode() > (for returning on read()) as a workaround. > It isn't the cleanest way, but it works. > > I appreciate a cleaner way, but it really

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Bob Weinand
> Am 07.12.2016 um 21:07 schrieb Yasuo Ohgaki : > > Hi Tony, > > On Wed, Dec 7, 2016 at 7:17 PM, Tony Marston > wrote: >> "Yasuo Ohgaki" wrote in message >> news:caga2bxyax05jbjavyxfsjyy6xia+4u14npfgywscl4aoofq...@mail.gmail.com... >>> >>> >>> Hi Marco, >>> >

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Bob Weinand
> Am 07.12.2016 um 21:49 schrieb Yasuo Ohgaki : > > Hi voters, > > Following people are vote against this RFC for now. > > bwoebi (bwoebi) > danack (danack) > hywan (hywan) > leigh (leigh) > levim (levim) > nikic (nikic) > ocramius (ocramius) > peehaa (peehaa) > ryat (ryat) > > I suppose bwoeb

Re: [PHP-DEV] PDO::PARAM_DOUBLE

2016-12-07 Thread Adam Baratz
> > For decimal, double wouldn't be the correct type anyway, as it could > cause loss of precision. > Sure, agree the name is imprecise. "Double" is mainly relevant to zvals. > Is there a reason PDO::PARAM_DOUBLE doesn't exist? > > I don't know if there's am historical reason. I think it should b

Re: [PHP-DEV] Use pthread in php extension

2016-12-07 Thread Stanislav Malyshev
Hi! > Of course you can link your extension with any possible library. > Particularly with pthreads, when PHP is compiled non thread safe, you > need to be very careful using the PHP APIs. Many will be not thread > safe in that case. Best strategy were probably not using PHP APIs in > the thread c

Re: [PHP-DEV] PDO::PARAM_DOUBLE

2016-12-07 Thread Matteo Beccati
Hi, On 07/12/2016 22:39, Adam Baratz wrote: > If you want to bind a double to a statement, the accepted approach is to > bind as a string: > http://stackoverflow.com/questions/2718628/pdoparam-for-type-decimal For decimal, double wouldn't be the correct type anyway, as it could cause loss of prec

[PHP-DEV] Change in Exception re-throwing

2016-12-07 Thread Dmitry Stogov
Hi, Please take a look into the patch. https://gist.github.com/dstogov/35a480a705b4a96d3d150e4d92dfd1a5 It substitutes calls to zend_throw_exception_internal(NULL) by zend_rethrow_exeption(). This simplifies code and dosn't change any behavior for PHP itself, however this may affect some th

[PHP-DEV] PDO::PARAM_DOUBLE

2016-12-07 Thread Adam Baratz
If you want to bind a double to a statement, the accepted approach is to bind as a string: http://stackoverflow.com/questions/2718628/pdoparam-for-type-decimal However, this means that prepared statements see these values as strings. This can cause issues, for example: http://stackoverflow.com/que

[PHP-DEV] Improvements to the PHP test suite

2016-12-07 Thread Daniel Morris
Since around 2011 there's been an item on the ideas list on php.net: (https://wiki.php.net/ideas/runtests) to improve the PHP test suite, I was thinking as one of my first major contributions I would like to take a stab at this, there's no upwards of 11,000 tests as compared to the 8000 or so when

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Yasuo Ohgaki
Hi voters, Following people are vote against this RFC for now. bwoebi (bwoebi) danack (danack) hywan (hywan) leigh (leigh) levim (levim) nikic (nikic) ocramius (ocramius) peehaa (peehaa) ryat (ryat) I suppose bwoebi and levim vote against due to error and exception usage. Thank you for feedback,

[PHP-DEV] [VOTE] Debugging PDO Prepared Statement Emulation v2

2016-12-07 Thread Adam Baratz
Hi, A little over two weeks have passed since posting this RFC: https://wiki.php.net/rfc/debugging_pdo_prepared_statement_emulation_v2 There's been some discussion on this list: http://marc.info/?l=php-internals&m=148034706404511&w=2 Discussion has cooled off, so I'd like to open to a vote. Voti

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Yasuo Ohgaki
Hi all, On Thu, Dec 8, 2016 at 5:07 AM, Yasuo Ohgaki wrote: >> >> I do not see the point in this RFC. > > Did you read the RFC? > It enables to write serializer by PHP script, clean and simple. It > cannot be done by save handler. > > Besides, the reason why we don't have user defined serializer

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Yasuo Ohgaki
Hi Tony, On Wed, Dec 7, 2016 at 7:17 PM, Tony Marston wrote: > "Yasuo Ohgaki" wrote in message > news:caga2bxyax05jbjavyxfsjyy6xia+4u14npfgywscl4aoofq...@mail.gmail.com... >> >> >> Hi Marco, >> >> Thank you for explaining the reason why! >> >> On Mon, Dec 5, 2016 at 11:12 AM, Marco Pivetta wrot

[PHP-DEV] UGLY Benchmark Results for PHP Master 2016-12-07

2016-12-07 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-12-06 20:28:46-08:00 commit: 5011a11 previous commit:795cd6d revision date: 2016-12-07 01:43:13+03: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] Use pthread in php extension

2016-12-07 Thread Anatol Belski
Hi Simon, > -Original Message- > From: simon .barotte [mailto:simon.baro...@gmail.com] > Sent: Tuesday, December 6, 2016 10:49 AM > To: internals@lists.php.net > Subject: [PHP-DEV] Use pthread in php extension > > Hi all, > > I developpe an extension php, and I would like use Linux pthre

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Tony Marston
"Yasuo Ohgaki" wrote in message news:caga2bxyax05jbjavyxfsjyy6xia+4u14npfgywscl4aoofq...@mail.gmail.com... Hi Marco, Thank you for explaining the reason why! On Mon, Dec 5, 2016 at 11:12 AM, Marco Pivetta wrote: I voted "no" because I don't see any advantage over using a custom session save

Re: Fwd: [PHP-DEV] RFC: Anonymous Class Lexical Scope

2016-12-07 Thread MichaƂ Brzuchalski
Hi Wes, How about magic `$parent` variable accessed in classes which are declared inside other classes? Why `$parent`? I was thinking of it in case of inner classes also, I've got some concept about it https://brzuchalski.com/blog/inner-classes-in-php-concept and think therre might such variable

Re: Fwd: [PHP-DEV] RFC: Anonymous Class Lexical Scope

2016-12-07 Thread Wes
One important thing I'd like to have here is importing the "outer" $this. e.g.: public function bar(){ return new class use($this as $that){ public function test(){ return $this->that; } }; } And I dislike how this would look with NikiC's proposal: re