utexas_pjm Posted May 12, 2007 Share Posted May 12, 2007 Anyone know if there is a simple way to override built in functions in PHP? After a few google searches I've found a PECL extension: http://us.php.net/override_function that does exactly what I need, but before I make this a requirement for my software I'd like to see if there's a simpler route. Thanks, Patrick Link to comment https://forums.phpfreaks.com/topic/51062-override-built-in-function/ Share on other sites More sharing options...
MadTechie Posted May 12, 2007 Share Posted May 12, 2007 I don't know of another route you could take but do you really need to override a built in function ? --Ignore this question as its not "help" but i found myself in a real mess just playing with override.. Link to comment https://forums.phpfreaks.com/topic/51062-override-built-in-function/#findComment-251285 Share on other sites More sharing options...
utexas_pjm Posted May 12, 2007 Author Share Posted May 12, 2007 I don't know of another route you could take but do you really need to override a built in function ? --Ignore this question as its not "help" but i found myself in a real mess just playing with override.. Yes, I do. I'm in the process of writing a HTTP/1.1 webserver entirely in PHP. The server currently serves up static files without a problem, but I'm writing a module which will render php files dynamically. To do this I'll need to override some functions like header(), ob_start(), etc... Best, Patrick Link to comment https://forums.phpfreaks.com/topic/51062-override-built-in-function/#findComment-251289 Share on other sites More sharing options...
MadTechie Posted May 12, 2007 Share Posted May 12, 2007 At that level the only help i could give is moral support.. so Come on Patrick we know you can do it.. one pecl solution i found was runkit but i also hear this ability will be in PHP6.. look into runkit.internal_override .ini directive then use runkit_function_redefine() hope thats of some help ??? Link to comment https://forums.phpfreaks.com/topic/51062-override-built-in-function/#findComment-251317 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.