Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.