[PHP-DEV] PHPUnit's tests fail with PHP 7.1.2-dev

2017-01-29 Thread Sebastian Bergmann
Hi! Does anybody have an idea what changed between PHP 7.1.1 and the current state of the PHP 7.1 branch that would explain https://github.com/sebastianbergmann/phpunit/issues/2454? Thanks, Sebastian -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.n

Re: [PHP-DEV] Not autoloading functions

2017-01-29 Thread Tony Marston
"Niklas Keller" wrote in message news:canuqdci945m2tddzty_tuuhdqn1xj9wjgsl_eqbyqr5f7_x...@mail.gmail.com... I'm sorry, it's unacceptable for who? Only for not defined function it would be called. If I call the same function a thousand times, the autoload will be attempted just the first tim

Re: [PHP-DEV] Fwd: Type Collection

2017-01-29 Thread Rasmus Schultz
> The Collection is Iterable, Traversable, Countable like an array to be > compatible with foreach and other Traversable-compatibles functions. Right, so it's an array. Except, it's an object-type, rather than a value-type like arrays. (I'm guessing - I don't think you specified?) And it's type-

Re: [PHP-DEV] Not autoloading functions

2017-01-29 Thread Wes
Curious that those who are posting here put all functions in the same file. So, why don't you just require_once('Namespace/functions.php') ?

Re: [PHP-DEV] Fwd: Type Collection

2017-01-29 Thread Sebastian Bergmann
Am 28.01.2017 um 17:10 schrieb Niklas Keller: > sounds like everything you want is typed arrays? I would love typed arrays. Basically Foo[] to indicate an array of objects of type Foo. IDEs such as PhpStorm as well as documentation tools already support this syntax when used in docblocks. -- PH

[PHP-DEV] Re: [VOTE] Deprecations for PHP 7.2

2017-01-29 Thread Nikita Popov
On Sun, Jan 15, 2017 at 3:27 PM, Nikita Popov wrote: > Hi internals, > > I've started the vote on https://wiki.php.net/rfc/deprecations_php_7_2. > All votes are 2/3 majority and end on 29-01-2017. > > Thanks, > Nikita > Voting has been closed, all of the proposals in this RFC have been accepted

Re: [PHP-DEV] Not autoloading functions

2017-01-29 Thread Rowan Collins
On 29/01/2017 15:37, Wes wrote: Curious that those who are posting here put all functions in the same file. So, why don't you just require_once('Namespace/functions.php') ? By that argument, why not just require_once('Namespace/ClassName.php)? It turns out that many people find autoloading a m

Re: [PHP-DEV] Re: Improving mt_rand() seed

2017-01-29 Thread Tom Worster
On 1/28/17 4:32 PM, Yasuo Ohgaki wrote: Could you give some examples? I'm not sure what kind of IoT devices/OS that support PHP do not have CSPRNG. I'm sorry, my reply ended up with subject "Re: internals Digest 27 Jan 2017 10:58:15 - Issue 4425". My fault. I'll copy it here... There a

Re: [PHP-DEV] Not autoloading functions

2017-01-29 Thread Wes
Hi Rowan, I probably wasn't clear enough. How is having to write use namespace Foo\Bar\Baz; better than require_once("../Foo/Bar/Baz/functions.php");

Re: [PHP-DEV] Not autoloading functions

2017-01-29 Thread Rowan Collins
On 29/01/2017 17:56, Wes wrote: Hi Rowan, I probably wasn't clear enough. How is having to write use namespace Foo\Bar\Baz; better than require_once("../Foo/Bar/Baz/functions.php"); OK, your last question just mentioned putting multiple functions in one file, not that you were addressing that

Re: [PHP-DEV] [RFC] libsodium (PHP 7.2)

2017-01-29 Thread Jakub Zelenka
Hi, On Wed, Jan 11, 2017 at 6:22 PM, Scott Arciszewski wrote: > Hi all, > > I'm resurrecting my RFC to add libsodium as a core extension to PHP 7.2. > > I'm still not sure why it needs to be in the core. As I said before, there are lots of healthy extension that are not in the core and it certai

[PHP-DEV] [RFC] Deprecate and Remove Bareword (Unquoted) Strings

2017-01-29 Thread Rowan Collins
Good evening all! Currently, if the constant FROB_ACTIVE is not defined, the code "echo FROB_ACTIVE;" results in an E_NOTICE and the string 'FROB_ACTIVE' being displayed. I would like to propose that this be changed to an E_WARNING in PHP 7.2, and to an Error in PHP 8.0. My reasoning for thi

Re: [PHP-DEV] [RFC] Deprecate and Remove Bareword (Unquoted) Strings

2017-01-29 Thread Niklas Keller
2017-01-29 20:33 GMT+01:00 Rowan Collins : > Good evening all! > > Currently, if the constant FROB_ACTIVE is not defined, the code "echo > FROB_ACTIVE;" results in an E_NOTICE and the string 'FROB_ACTIVE' being > displayed. I would like to propose that this be changed to an E_WARNING in > PHP 7.2,

Re: [PHP-DEV] [RFC] Deprecate and Remove Bareword (Unquoted) Strings

2017-01-29 Thread Nikita Popov
On Sun, Jan 29, 2017 at 8:33 PM, Rowan Collins wrote: > Good evening all! > > Currently, if the constant FROB_ACTIVE is not defined, the code "echo > FROB_ACTIVE;" results in an E_NOTICE and the string 'FROB_ACTIVE' being > displayed. I would like to propose that this be changed to an E_WARNING i

Re: [PHP-DEV] writing extensions best practice, pass an object as parameter

2017-01-29 Thread Johannes Schlüter
On Wed, 2017-01-18 at 09:17 +0100, Torsten Rosenberger wrote: > Hello List > > I'm new to C and writing extensions > I hope this ist the right list. > > I want to port the PEAR HTML_Template_Sigma Class to an PHP > extension. I startet with the old book 'Building custom PHP Extensions' > found n

[PHP-DEV] Re: [RFC] Deprecate and Remove Bareword (Unquoted) Strings

2017-01-29 Thread Christoph M. Becker
On 29.01.2017 at 20:33, Rowan Collins wrote: > Currently, if the constant FROB_ACTIVE is not defined, the code "echo > FROB_ACTIVE;" results in an E_NOTICE and the string 'FROB_ACTIVE' being > displayed. I would like to propose that this be changed to an E_WARNING > in PHP 7.2, and to an Error in P

[PHP-DEV] Re: [RFC][VOTE] Trailing commas in all list syntax

2017-01-29 Thread Christoph M. Becker
On 27.01.2017 at 17:05, Sammy Kaye Powers wrote: > After a 2 week (ahem... 1 year & 3 month - sorry for dropping the > ball) discussion period, the "Trailing commas in all list syntax" RFC > is now open for voting. > > See the discussion here: > https://www.mail-archive.com/internals@lists.php.ne

Re: [PHP-DEV] Re: Improving mt_rand() seed

2017-01-29 Thread Yasuo Ohgaki
Hi Tom, On Mon, Jan 30, 2017 at 1:22 AM, Tom Worster wrote: > On 1/28/17 4:32 PM, Yasuo Ohgaki wrote: > > Could you give some examples? > > I'm not sure what kind of IoT devices/OS that support PHP do not have > CSPRNG. > > I'm sorry, my reply ended up with subject "Re: internals Digest 27 Jan >

Re: [PHP-DEV] Re: Improving mt_rand() seed

2017-01-29 Thread Yasuo Ohgaki
Hi all, On Mon, Jan 30, 2017 at 10:08 AM, Yasuo Ohgaki wrote: > Issues are >> - Current mt_rand() is not fully exploited. It wastes more than 99% of its >> random cycle. >> >> This was discussed in Aug last year and dropped. >> > I didn't notice the discussion, let's discuss again. > > It does n

Re: [PHP-DEV] [RFC][VOTE] Trailing commas in all list syntax

2017-01-29 Thread Yasuo Ohgaki
On Sat, Jan 28, 2017 at 1:05 AM, Sammy Kaye Powers wrote: > After a 2 week (ahem... 1 year & 3 month - sorry for dropping the > ball) discussion period, the "Trailing commas in all list syntax" RFC > is now open for voting. > > See the discussion here: > https://www.mail-archive.com/internals@lis

Re: [PHP-DEV] [RFC][VOTE] Trailing commas in all list syntax

2017-01-29 Thread Guy Marriott
On Mon, Jan 30, 2017 at 4:17 PM, Yasuo Ohgaki wrote: > > > I would have voted yes, but I missed the vote. > Unless there is critical reason not to implement it that I don't know of, I > prefer to allow > trailing commas like array universally/consistently. > > Regards, > > -- > Yasuo Ohgaki > yoh

Re: [PHP-DEV] Re: Improving mt_rand() seed

2017-01-29 Thread Yasuo Ohgaki
Hi all, On Mon, Jan 30, 2017 at 11:25 AM, Yasuo Ohgaki wrote: > Our part could be fixed by us. Let's fix it now. > > Lauri made patch for unseeded mt_rand(). I'll prepare patch that allows > int array > initialization for mt_srand() so that whole state buffer can be > initialized as user specifi

Re: [PHP-DEV] Re: [RFC] Deprecate and Remove Bareword (Unquoted) Strings

2017-01-29 Thread Wes
Great! We can get rid of one of the most ridiculed "features" of the language :D http://php.net/manual/en/language.types.array.php#language.types.array.donts "This is wrong, but it works."