Re: [PHP-DEV] Opcode EXT_FCALL_BEGIN and EXT_FCALL_END?

2009-12-08 Thread Mathieu Suen
o that the debugger could do "step into" and "step over"). They are not used in non-debugging context. Ok Thanks, I guess it's the same for all the EXT_* opcode -- Mathieu Suen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Opcode EXT_FCALL_BEGIN and EXT_FCALL_END?

2009-12-07 Thread Mathieu Suen
Hi, I am wondering what the opcode EXT_FCALL_BEGIN and EXT_FCALL_END is used for? Thanks -- Mathieu Suen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Inspecting opcode

2009-12-03 Thread Mathieu Suen
Sebastian Bergmann a écrit : Am 03.12.2009 16:51, schrieb Mathieu Suen: Does anyone know how to inspect the opcode of a php file? VLD: http://derickrethans.nl/vld.php bytekit-cli: http://github.com/sebastianbergmann/bytekit-cli Is there some online tools wihhout any pear to

[PHP-DEV] Inspecting opcode

2009-12-03 Thread Mathieu Suen
Hi, Does anyone know how to inspect the opcode of a php file? Thanks -- Mathieu Suen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RFC: Custom Factories (SPL)

2009-11-19 Thread Mathieu Suen
#x27;t see the point with "the Law of Demeter"? On 11/18/2009 7:19 PM, Mathieu Suen wrote: Right!! I get confused with: $classNamme::getInstance(); So you can easily inject dependency: class Foo { protected $emailer; public function __construct($emailClass) { $this->emaile

Re: [PHP-DEV] RFC: Custom Factories (SPL)

2009-11-19 Thread Mathieu Suen
o find some skilled internals wizard who can implement it, because not being a C developer myself, all I can offer is making suggestions and fine coffee. Looking forward to hearing your comments! Robert -- Mathieu Suen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RFC: Custom Factories (SPL)

2009-11-19 Thread Mathieu Suen
ervices::load('databaseConnexion'); How PHP should treat the singleton ? getInstance() is just a convention. Create a service mechanism directly in php implies that php implements singleton model too. Some language have support for IoC. See newspeak: http://gbracha.blogspot.com/2009/07/ban-on-imports-continued.html -- Mathieu Suen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RFC: Custom Factories (SPL)

2009-11-18 Thread Mathieu Suen
Eloy Bote Falcon a écrit : 2009/11/18 Mathieu Suen Etienne Kneuss a écrit : Hello, On Wed, Nov 18, 2009 at 5:54 PM, Mathieu Suen wrote: Robert Lemke a écrit : Hi folks, after discussing the idea with various PHP developers I now felt safe enough that it's not a completely stupid

Re: [PHP-DEV] RFC: Custom Factories (SPL)

2009-11-18 Thread Mathieu Suen
Etienne Kneuss a écrit : Hello, On Wed, Nov 18, 2009 at 5:54 PM, Mathieu Suen wrote: Robert Lemke a écrit : Hi folks, after discussing the idea with various PHP developers I now felt safe enough that it's not a completely stupid idea to post an RFC for it. The idea is to add suppor

Re: [PHP-DEV] RFC: Custom Factories (SPL)

2009-11-18 Thread Mathieu Suen
all I can offer is making suggestions and fine coffee. Looking forward to hearing your comments! Robert An other way maybe to allow this: $email = new $emailClassName(); -- Mathieu Suen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Closures and $this

2009-11-17 Thread Mathieu Suen
Chris Stockton a écrit : Hello, On Tue, Nov 17, 2009 at 2:59 AM, Mathieu Suen wrote: Christian Seiler a écrit : Hi, since a few months have passed since the last discussion on this topic and perhaps people had time to gather some experience with the current closure implementation in PHP 5.3

Re: [PHP-DEV] Closures and $this

2009-11-17 Thread Mathieu Suen
namicaly bind $this? The same question apply for temporary varaible. IIRC you statically bind temporary with the 'use(..)' syntaxe. So why $this should be different. I agree on proposition A. -- Mathieu Suen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] bug when using foreach with references?

2009-11-16 Thread Mathieu Suen
Etienne Kneuss a écrit : Hello, On Mon, Nov 16, 2009 at 2:51 PM, Mathieu Suen wrote: Etienne Kneuss a écrit : Hello, On Mon, Nov 16, 2009 at 2:10 PM, Mathieu Suen *SKIP* Static scoping is closely related to variable declaration. In PHP, there is no such thing as a variable declaration

Re: [PHP-DEV] bug when using foreach with references?

2009-11-16 Thread Mathieu Suen
like to) change PHP's scoping for those reasons as it would break too much existing code. 2009/11/16 Mathieu Suen : Etienne Kneuss a écrit : Hello, On Mon, Nov 16, 2009 at 2:10 PM, Mathieu Suen wrote: Pierre Joye a écrit : On Mon, Nov 16, 2009 at 12:07 PM, Mathieu Suen wrote: • Pe

Re: [PHP-DEV] bug when using foreach with references?

2009-11-16 Thread Mathieu Suen
Etienne Kneuss a écrit : Hello, On Mon, Nov 16, 2009 at 2:10 PM, Mathieu Suen wrote: Pierre Joye a écrit : On Mon, Nov 16, 2009 at 12:07 PM, Mathieu Suen wrote: • Pensez à l'environnement, n'imprimez cet e-mail qu'en cas de réelle nécessité Discussing endlessly an iss

Re: [PHP-DEV] bug when using foreach with references?

2009-11-16 Thread Mathieu Suen
Pierre Joye a écrit : On Mon, Nov 16, 2009 at 12:07 PM, Mathieu Suen wrote: • Pensez à l'environnement, n'imprimez cet e-mail qu'en cas de réelle nécessité Discussing endlessly an issue only because you do not understand it is also an environmental problem, please consi

Re: [PHP-DEV] bug when using foreach with references?

2009-11-16 Thread Mathieu Suen
Fair enough. Thanks for examining it again with me. Best, Richard -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- • *Mathieu Suen* | It Team | www.easyflirt.com • mathieu [dot] suen [at] easyflirt [dot] com • EasyFlirt -

Re: [PHP-DEV] Regarding constructions like func()[0]

2009-11-10 Thread Mathieu Suen
jvlad a écrit : "Mathieu Suen" wrote in message news:4af91f92.4000...@easyflirt.com... Why isn't a mater of pushing the function call statement into a valuable statement? I guess something like this: statement : | value | function_call; value : | valriable | array_acces

[PHP-DEV] About php6 gc

2009-11-10 Thread Mathieu Suen
Hi, By looking at the php6 gc I guess you introduce a mark and sweep gc. Looking at the *_root function, it also seems that you have a generational mark & sweep gc. I have a couple of question : How many generation do you have? What is the meaning of the different color (black, white, grey)

Re: [PHP-DEV] Regarding constructions like func()[0]

2009-11-10 Thread Mathieu Suen
melfar a écrit : Hey, Yep, I think there might be some caveats to that change. The original patch did not work on methods, so I've fixed that and also made the return value an rvalue, so that you can't attempt to modify the temporary value, the zend_check_writable_variable guard will yield an er

Re: [PHP-DEV] Performance question about create_function

2009-10-26 Thread Mathieu Suen
Yes that the same but only for PHP <= 5.3. I am more asking about performance. Michael Stillwell a écrit : On Mon, Oct 19, 2009 at 1:13 PM, Mathieu Suen wrote: Looking at the way array_map is working, it could worth to use create_function for object. For example if I got a list of obj

[PHP-DEV] Performance question about create_function

2009-10-19 Thread Mathieu Suen
it's cost a lot in performance instead of the ugly verbose way: $ids = array(); foreach($someInstances) { $ids[] = $someInstances->getId(); } Of course I don't expect it to be faster but I hope that could worth the cost. Thanks -- -- Mathieu Suen -- -- PHP Internals - PHP R

[PHP-DEV] Doc on the VM

2009-10-01 Thread Mathieu Suen
Hi, I would like to know if there is some documentation on the different layout of the array, object varaible ... in php. Or were in the source can we read how the php VM reprensent those entites? Thanks -- -- Mathieu Suen -- -- PHP Internals - PHP Runtime Development Mailing List To

[PHP-DEV] Unset semantic on instance var

2009-07-16 Thread Mathieu Suen
lazy initialisation with the isset function but then now I will initalize all inst var with null and check with the is_null function. Would it be possible to have inst var null by default insthead of a pseudo unset/null variable. Thanks Cheers - Mathieu Suen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php