Re: [PHP-DEV] Introduction to the PHP source code

2016-12-29 Thread Sara Golemon
On 29/12/16 16:17, ilija.tov...@me.com wrote: > Looking at the giant repository I feel a little overwhelmed. Is there a > place where I can get started and learn more about the architecture of the > interpreter before diving into the source code itself? I’m sorry if this > question has been asked b

[PHP-DEV] Fwd: [RFC] HashContext as Object

2016-12-29 Thread Sara Golemon
On Mon, Dec 26, 2016 at 7:35 PM, Sara Golemon wrote: > I was trawling through Pull Requests and found #660 which I think is a > nice idea and deserves some attention. It involves minor BC however, > so I've updated the patch and presented it for your discussing > pleasure. > Specifically, I should

[PHP-DEV] How to foreach each function and execute functions of an object.

2016-12-29 Thread Netroby
I am trying to modify yaf extension. i try to write code to foreach functions of an object and try to execute them. but i got segment fault. i have no idea where i was wrong. I want to implement ```php foreach ($funcName in $obj) { call_user_func([$obj, $funcName]); } ``` my code snippet was

[PHP-DEV] Re: Bug 63744 - references in list()

2016-12-29 Thread David Walker
On 12/28/16 6:32 PM, Andrea Faulds wrote: Hi Dave, David Walker wrote: I stumbled upon this bug report (read: feature request) today and took a swing at it thinking it couldn't be that overly complex. But then again it was requested way back in the PHP4 era, so I figured there has to be some r

Re: [PHP-DEV] Introduction to the PHP source code

2016-12-29 Thread Bradley Weston
I'm trying to do the same thing. I've tried to fix a bug in SPL iterators. However the code is not documented anywhere and the guys on IRC aren't able to help much without dedicating their time. Maybe we can try figure it out together? https://bugs.php.net/bug.php?id=73471 Issue is at: h

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

2016-12-29 Thread Nicolas Grekas
Hi everyone, having worked a bit with anonymous classes these days, the current boilerplate is really high to inject some local context into them. So big +1 from me for the target. On the proposed syntax, I really prefer Nikita's proposal: return new class { > private $a = $var; > privat

[PHP-DEV] Introduction to the PHP source code

2016-12-29 Thread ilija . tovilo
Hi everyone! I’d like to get familiar with the PHP C code base so that I can contribute back to the community and maybe even implement a small RFC at some point when I feel comfortable enough. Looking at the giant repository I feel a little overwhelmed. Is there a place where I can get started

Re: [PHP-DEV] Decorator classes

2016-12-29 Thread Marco Pivetta
On Thu, Dec 29, 2016 at 3:27 PM, Mathieu Rochette wrote: > yeah it's mostly syntactic sugar, I think it would encourage developer to > use this pattern instead of inheritance when appropriate. > I also think that most of the time using the decorator pattern helps > following the single responsibi

Re: [PHP-DEV] Decorator classes

2016-12-29 Thread Mathieu Rochette
On 29/12/2016 14:18, Marco Pivetta wrote: On Thu, Dec 29, 2016 at 2:12 PM, Mathieu Rochette > wrote: Hello internals, I find that using the decorator pattern is very verbose and maybe something could be done about that, an article[1] I saw propose

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

2016-12-29 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-12-28 20:29:50-08:00 commit: e2a159f previous commit:f8aa57a revision date: 2016-12-28 11:48:36-08: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] Decorator classes

2016-12-29 Thread Mathieu Rochette
On 29/12/2016 14:44, Alexander Lisachenko wrote: 2016-12-29 16:12 GMT+03:00 Mathieu Rochette >: I find that using the decorator pattern is very verbose and maybe something could be done about that, an article[1] I saw proposed a "decorates" keyword to

Re: [PHP-DEV] Decorator classes

2016-12-29 Thread Alexander Lisachenko
2016-12-29 16:12 GMT+03:00 Mathieu Rochette : > I find that using the decorator pattern is very verbose and maybe > something could be done about that, > an article[1] I saw proposed a "decorates" keyword to solves this, here is > how it might look like in PHP: > > * the constructor is optional

Re: [PHP-DEV] Decorator classes

2016-12-29 Thread Marco Pivetta
On Thu, Dec 29, 2016 at 2:12 PM, Mathieu Rochette wrote: > Hello internals, > > I find that using the decorator pattern is very verbose and maybe > something could be done about that, > an article[1] I saw proposed a "decorates" keyword to solves this, here is > how it might look like in PHP: > >

[PHP-DEV] Decorator classes

2016-12-29 Thread Mathieu Rochette
Hello internals, I find that using the decorator pattern is very verbose and maybe something could be done about that, an article[1] I saw proposed a "decorates" keyword to solves this, here is how it might look like in PHP: interface Foo { public bar(); public taz(); } class EchoFooBar