Re: [PHP-DEV] GD vs Imagick

2017-08-16 Thread Pierre Joye
hi Rasmus, On Tue, Aug 15, 2017 at 5:52 PM, Rasmus Schultz wrote: > The following GD issue is all-too common: > > https://stackoverflow.com/questions/5773032/how-to-stop-gd2-from-washing-away-the-colors-upon-resizing-images > > Basically anyone who's ever accepted uploaded images and resized or >

[PHP-DEV] NEUTRAL Benchmark Results for PHP Master 2017-08-15

2017-08-16 Thread lp_benchmark_robot
Results for project PHP master, build date 2017-08-15 19:23:01-07:00 commit: 869fcce previous commit:b8f20d7 revision date: 2017-08-15 20:24:50+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] PHP 7.1.0 to 7.2.0beta2 mt_rand() modulo bias bug

2017-08-16 Thread Nikita Popov
On Thu, Aug 17, 2017 at 12:02 AM, Solar Designer wrote: > On Wed, Aug 16, 2017 at 11:41:55PM +0200, Solar Designer wrote: > > On Wed, Aug 16, 2017 at 10:06:02PM +0200, Nikita Popov wrote: > > > I'd suggest to split the 32-bit and 64-bit code codepaths entirely, as > the > > > interleaved #ifs are

Re: [PHP-DEV] PHP 7.1.0 to 7.2.0beta2 mt_rand() modulo bias bug

2017-08-16 Thread Solar Designer
On Wed, Aug 16, 2017 at 11:41:55PM +0200, Solar Designer wrote: > On Wed, Aug 16, 2017 at 10:06:02PM +0200, Nikita Popov wrote: > > I'd suggest to split the 32-bit and 64-bit code codepaths entirely, as the > > interleaved #ifs are somewhat hard to follow. Something like > > https://gist.github.com

Re: [PHP-DEV] PHP 7.1.0 to 7.2.0beta2 mt_rand() modulo bias bug

2017-08-16 Thread Solar Designer
On Wed, Aug 16, 2017 at 10:06:02PM +0200, Nikita Popov wrote: > I'd suggest to split the 32-bit and 64-bit code codepaths entirely, as the > interleaved #ifs are somewhat hard to follow. Something like > https://gist.github.com/nikic/64e7ec58ebb6121d350fb80927a65082 (not > thoroughly tested). This

[PHP-DEV] Re: [PHP-WEBMASTER] Subscribe Function Seems to be down for several days

2017-08-16 Thread Alan Feuerbacher
On 8/16/2017 10:25 AM, Hannes Magnusson wrote: how are you trying to subscribe? I go to the support page http://php.net/support.php and click on the "This list" link under "Mailing Lists". This takes me to http://php.net/mailing-lists.php . Under "General Mailing Lists" I click the radio b

Re: [PHP-DEV] Easy method of overriding built-in php functions.

2017-08-16 Thread David Lundgren
On 8/16/17 3:02 PM, Ryan Jentzsch wrote: > I am aware of Advanced PHP debugger but what I need this type of > functionality for is mocking and testing. If you're using namespaces you can try overriding the built-in functions that way. I've done this successfully in my own library for mocking ldap

Re: [PHP-DEV] Easy method of overriding built-in php functions.

2017-08-16 Thread Sara Golemon
On Wed, Aug 16, 2017 at 4:02 PM, Ryan Jentzsch wrote: > As an example I want to use PHPUnit mocking feature to create a mock of a > class. However in the constructor of this class is the following line to > get the expected JSON string: > > $result = file_get_contents('php://input'); > > I can not

[PHP-DEV] Re: Easy method of overriding built-in php functions.

2017-08-16 Thread Christoph M. Becker
On 16.08.2017 at 22:02, Ryan Jentzsch wrote: > I am aware of Advanced PHP debugger but what I need this type of > functionality for is mocking and testing. > > As an example I want to use PHPUnit mocking feature to create a mock of a > class. However in the constructor of this class is the follow

Re: [PHP-DEV] PHP 7.1.0 to 7.2.0beta2 mt_rand() modulo bias bug

2017-08-16 Thread Nikita Popov
On Wed, Aug 16, 2017 at 9:47 PM, Leigh wrote: > On Wed, 16 Aug 2017 at 20:13 Solar Designer wrote: > > > Also, why even bother to support ranges beyond 32-bit? Sounds like a > > misfeature to me, considering it won't(?) be universally available on > > all PHP builds anyway (not on 32-bit ones,

[PHP-DEV] Easy method of overriding built-in php functions.

2017-08-16 Thread Ryan Jentzsch
I am aware of Advanced PHP debugger but what I need this type of functionality for is mocking and testing. As an example I want to use PHPUnit mocking feature to create a mock of a class. However in the constructor of this class is the following line to get the expected JSON string: $result = fil

Re: [PHP-DEV] PHP 7.1.0 to 7.2.0beta2 mt_rand() modulo bias bug

2017-08-16 Thread Leigh
On Wed, 16 Aug 2017 at 20:13 Solar Designer wrote: > Also, why even bother to support ranges beyond 32-bit? Sounds like a > misfeature to me, considering it won't(?) be universally available on > all PHP builds anyway (not on 32-bit ones, right?) and thus shouldn't(?) > be relied upon by applica

[PHP-DEV] PHP 7.1.0 to 7.2.0beta2 mt_rand() modulo bias bug

2017-08-16 Thread Solar Designer
Hi, It is well-known that it is impossible to map e.g. a 32-bit random number with a uniform distribution over its full range of values onto a range with fewer different values while maintaining a uniform distribution, except when the target range contains a whole power of 2 number of different va

[PHP-DEV] Re: [PHP-WEBMASTER] Subscribe Function Seems to be down for several days

2017-08-16 Thread Hannes Magnusson
how are you trying to subscribe? Are you submitting the http://php.net/mailing-lists.php form? In which case, which mirror are you looking at? Could you try another mirror? If that still doesn't work, try sending empty mail to -subscr...@lists.php.net (e.g. internals-subscr...@lists.php.net) If

Re: [PHP-DEV] GD vs Imagick

2017-08-16 Thread Remi Collet
Le 15/08/2017 à 12:52, Rasmus Schultz a écrit : > I am starting to wonder why GD is the default in PHP? Don't really know, perhaps because the first one ? But we have various alternatives: - imagick - gmagick - vips (perhaps others) And ImageMagick is really an ugly upstream - most common commi

Re: [PHP-DEV] GD vs Imagick

2017-08-16 Thread S.A.N
2017-08-15 13:52 GMT+03:00 Rasmus Schultz : > The following GD issue is all-too common: > > https://stackoverflow.com/questions/5773032/how-to-stop-gd2-from-washing-away-the-colors-upon-resizing-images > > Basically anyone who's ever accepted uploaded images and resized or > converted them, has bum