Jump to content

Override built in function


utexas_pjm

Recommended Posts

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

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

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  ???

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.