News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

OpenIdeasCompany.com:
Redeclaring native PHP functions
May 22, 2006 @ 06:43:24

If you've ever really found a time when you needed to overwrite one of PHP's bult-in functions with your own custom one (maybe a custom handler or the like), you might want to check out this post on OpenIdeasCompany.com.

The author needed to redeclare session_start in a few files to change the place the default sessions are located at (spanned across three machines). He didn't want to rewrite the application to make this change, so he used the runkit extension out of pecl (and the php-devel package) to create a solution redefining functions to match his needs.

Of course, there are some easier ways to accomplish what he needed, but it's still an interesting method if there's really just no other way.

0 comments voice your opinion now!
redeclare native function runkit php-devel redeclare native function runkit php-devel


blog comments powered by Disqus

Similar Posts

Shay Ben Moshe's Blog: PHP's native array vs SplFixedArray performance

Juozas Kaziukenas' Blog: Lambda functions are coming to PHP

I/O Reader: 15 Cool Things & 12 Things to Dislike About PHP

Stijn Leenknegt's Blog: [PHP6] function-return-array idea!

Gergely Hodicska's Blog: What is new in PHP 5.3 - part 3: mysqlnd


Community Events

Don't see your event here?
Let us know!


development laravel threedevsandamaybe community wordpress interview framework series laravel5 api opinion unittest extension library feature introduction podcast voicesoftheelephpant release language

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework