Re: Call to undefined function

From: Date: Tue, 14 Nov 2006 10:14:28 +0000
Subject: Re: Call to undefined function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-244589@lists.php.net to get a copy of this message
On Tue, 14 Nov 2006 09:36:52 +0000, Tom Chubb wrote: > I have just encountered a fatal error using file_put_contents() on a PHP4 box. > After a bit of research I found a simple function within the php.net > user comments. > I just wanted to know what happens if I then tried to run this script > on a PHP 5 box, whereby I'd be defining a function that already > exists. > Should I be changing the name of the function just in case it moves to > PHP5 in the future? > Thanks, Hi Tom, if (!function_exists('file_put_contents')) { function file_put_contents (...) { // Do it your way! } } Ivo

« previous php.general (#244589) next »