Re: PATCH: Implementing closures in PHP
| From: | Christian Seiler | Date: | Sun, 23 Dec 2007 13:40:02 +0000 |
| Subject: | Re: PATCH: Implementing closures in PHP | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34232@lists.php.net to get a copy of this message | ||
Hi David!
> One question about the names you generate for the function table in
> combination with opcode caches. [...]
I now updated the patch so that this problem is addressed. You will find
it here:
http://www.christian-seiler.de/temp/closures-php-5-3-v2.patch
The compiled functions are now named __compiled_lambda_$hash_$counter,
where $counter is a per-file lambda counter and $hash is a hash made
from the file name (see hash_compiled_filename in zend_compile.c, I
wasn't sure how good Zend's hash function is with duplicates so I hashed
the file name AND its basename - feel free to change that function if
you have a better idea or know it's safe to only hash the filename
itself because duplicates are too rare).
Regards,
Christian