Re: [PHP-DEV] Refactoring code for namespaces appliance

2007-12-22 Thread Paul Biggar
On Dec 22, 2007 12:02 AM, Martin Alterisio [EMAIL PROTECTED] wrote: 2007/12/21, Paul Biggar [EMAIL PROTECTED]: 4) find all function calls (not method calls) which are not keywords (array, isset, unset, list, etc) and prefix them with :: list, array etc wouldnt be confused with

Re: [PHP-DEV] Re: [PHP-CVS] cvs: CVSROOT / avail loginfo

2007-12-22 Thread Lukas Kahwe Smith
On 21.12.2007, at 19:38, Stanislav Malyshev wrote: Sounds to me like we should stop accepting this legal BS. Then they will only be able to pay for a nice little house if they write understandable stuff or nothing is they are unwilling to adapt to the demands of their customers. It is

[PHP-DEV] PATCH: Implementing closures in PHP (was: anonymous functions in PHP)

2007-12-22 Thread Christian Seiler
Hi, I was following this thread and came upon Jeff's posting on how closures could be implemented in PHP. Since I would find the feature to be EXTREMELY useful, I decided to actually implement it more or less the way Jeff proposed. So, here's the patch (against PHP_5_3, I can write one against

[PHP-DEV] Re: PATCH: Implementing closures in PHP

2007-12-22 Thread Greg Beaver
Christian Seiler wrote: Hi, I was following this thread and came upon Jeff's posting on how closures could be implemented in PHP. Hi, typo alert: Index: Zend/zend_vm_def.h === RCS file: /repository/ZendEngine2/zend_vm_def.h,v

Re: [PHP-DEV] PATCH: Implementing closures in PHP

2007-12-22 Thread Christian Seiler
Hi! typo alert: Oh, thanks (don't know how it got in there ;-)), I fixed that, same address: http://www.christian-seiler.de/temp/closures-php-5-3.patch Very impressive patch, I'll be interested to try it out when I get a chance. Thanks! Christian -- PHP Internals - PHP Runtime

Re: [PHP-DEV] PATCH: Implementing closures in PHP (was: anonymous functions in PHP)

2007-12-22 Thread David Zülke
One question about the names you generate for the function table in combination with opcode caches. Let's assume I have APC installed, and do the following: foo.php: $foo = function() { echo foo; } bar.php: include('foo.php'); All works fine, and cached versions of both files would be

Re: [PHP-DEV] PATCH: Implementing closures in PHP (was: anonymous functions in PHP)

2007-12-22 Thread troels knak-nielsen
I have another observation about names. Instead of using an arbitrary name, as the name of the function, wouldn't it be possible to let the name be derived from the function-body. Eg., if you took the function-body's tokens and created a hash from them. This would have two implications: 1)

[PHP-DEV] CVS Account Request: chapg

2007-12-22 Thread Alexey Chupahin
Patching libGD -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PATCH: Implementing closures in PHP (was: anonymous functions in PHP)

2007-12-22 Thread Martin Alterisio
2007/12/22, Christian Seiler [EMAIL PROTECTED]: PPS: Oh, yeah, if it should be legally necessary, I grant the right to anybody to use this patch under any OSI certified license you may want to choose. That's very kind of you but, if I was explained right, you don't have copyright on a

Re: [PHP-DEV] CVS Account Request: chapg

2007-12-22 Thread Pierre
On Dec 22, 2007 8:37 PM, Alexey Chupahin [EMAIL PROTECTED] wrote: Patching libGD Confirmed, he maintains the openvms build scripts. -- Pierre http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

[PHP-DEV] __autoload proposal

2007-12-22 Thread Wojciech Malota
I have a proposal for prototype of __autoload function in PHP 5.3.0. In this version of PHP namespaces will be available. Prototype of __autoload could look like this: __autoload($classname, $namespace = null); Now __autoload have only one argument which is a name of searched class. Second

[PHP-DEV] __autoload proposal

2007-12-22 Thread Wojciech Malota
I have a proposal for prototype of __autoload function in PHP 5.3.0. In this version of PHP namespaces will be available. Prototype of __autoload could look like this: __autoload($classname, $namespace = null); Now __autoload have only one argument which is a name of searched class. Second

Re: [PHP-DEV] __autoload proposal

2007-12-22 Thread David Coallier
On Dec 22, 2007 3:43 PM, Wojciech Malota [EMAIL PROTECTED] wrote: I have a proposal for prototype of __autoload function in PHP 5.3.0. In this version of PHP namespaces will be available. Prototype of __autoload could look like this: __autoload($classname, $namespace = null); Now __autoload

Re: [PHP-DEV] PATCH: Implementing closures in PHP

2007-12-22 Thread Christian Seiler
Hi! I'm going to answer to everybody at once, if that's OK. David Zülke wrote: One question about the names you generate for the function table in combination with opcode caches. [...] While this is a constructed example, it could easily occur with conditional includes with environments

Re: [PHP-DEV] PATCH: Implementing closures in PHP

2007-12-22 Thread troels knak-nielsen
On Dec 23, 2007 2:23 AM, Christian Seiler [EMAIL PROTECTED] wrote: First of all: I don't quite understand what you mean when you want to serialize a function (closure or not)? The opcodes? Ok, sure, with the current PHP implementation you can serialize the variable used to CALL the function

[PHP-DEV] Re: Maybe a problem? undetected name clash makes static method unaccessible through outside static reference

2007-12-22 Thread Martin Alterisio
2007/12/21, Greg Beaver [EMAIL PROTECTED]: Martin Alterisio wrote: Consider the following code: foo.php: ?php class test { public static function foo() { echo I'm foo in class test\n; } public static function foo2() { self::foo(); } } ? foo2.php: ?php namespace

Re: [PHP-DEV] __autoload proposal

2007-12-22 Thread Stanislav Malyshev
Now __autoload have only one argument which is a name of searched class. Second argument could be a namespace where class is searched. It should have default value for backward compatibility. What for? It always receives full name of the class, whatever it is. I think it is the most flexible