|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-06-03 09:49 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 27 02:00:02 2025 UTC |
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?