ID:               23987
 Updated by:       [EMAIL PROTECTED]
 Reported By:      gfraley5 at earthlink dot net
-Status:           Open
+Status:           Wont fix
 Bug Type:         Feature/Change Request
 Operating System: All
 PHP Version:      4.3.2
 New Comment:

We're not going to add stuff to deregister functions, this is a totally
broken concept.

Derick


Previous Comments:
------------------------------------------------------------------------

[2003-06-03 09:43:00] gfraley5 at earthlink dot net

If this capability already exists I can't find it.  Is it
planned/possible to allow functions to be deregistered so that they can
be replaced, basically overloading them?  In other words, right now, if
function a() is defined/registered, I am not able to replace it
conditionally, I imagine since the compiler has already compiled the
script prior to processing it.  I am seeking the ability to
conditionally call scripts where the different scripts have the same
function names that the calling script has.  In other words, the
scenario is this.

Script Master.php might look like this:

<?
If (condition) {
    include('override_script.php');
    exit();
}

function sameNameAsInOverride_script() {
//do stuff
}
?>

Possibly have it do this:
<?
If (condition) {
    function_deregister(sameNameAsInOverride_script);
    include('override_script.php');
    exit();
}

function sameNameAsInOverride_script() {
//do stuff
}
?>

Possible?

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=23987&edit=1

Reply via email to