Hello internals,

  i just made up a tiny patch that allows us to deprecate functions. The
background is that in the past we changed to issue E_STRICT or E_NOTICE
for stuff we are going to change in later versions. This is right now not
easily possible when we change to replace a functions name. The usual way
to add the new name is to rename the function and add an alias with the old
name but for the deprecation message we would need to have the function
implementation twice so that one can issue the message. The patch now
allows us to specify a function flag on the alias.

I checked an early version of the patch with Andi and he didn't like the
introduction of another if(). For the explicit calling handler i see no
problem in adding it since it is just an integer comparision which makes
out less than 0.1% of the zend_call_function() for the function-call
opcode i hid the check behind the abstract check. So there is no new
penalty. And actually i think the abstract check is neccessary for the
the other part also. So the patch found an error and doesn't come with any
additional penalty at all.

Patch is available for both 5.1 and HEAD here:
http://php.net/~helly/php/ext/ze2/ze2-deprecated-20060219-5_1.diff.txt
http://php.net/~helly/php/ext/ze2/ze2-deprecated-20060219-HEAD.diff.txt

Anyone against?

Best regards,
 Marcus

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to