internal class' static properties and constants
Hello Michael,
Oh, now i see it there is a 1 for copy which means estrndup().
Yep in reflection api it is used for the exact same reason. I was only
wondering whether that can happen here. Since your code is called outside
request time it can only happen if some code tries to update the same prop
with the same value twice.
Temp zvals are used in scripts and can never be stored at least that was the
goal. In your case always and unfortunatley also in the engine usage for
edge cases they are going to be stored. So probably it is easier here to go
with normal props initilized with refcount=1. You have to try and see.
php -r '$d=42; define("a",$d); class t { const x=a;} var_dump(t::x);' That's why.
Ah, yes, you're right here too, i didn't see the full context and got
wrong with all those function names somehow.
Sorry for getting this mail out that late....i thought it was sent in the
morning.
Best regards,
Marcus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
|