Re: How to redefine a function if it doesn't exist?

From: Date: Tue, 30 Mar 2010 15:26:42 +0000
Subject: Re: How to redefine a function if it doesn't exist?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-303620@lists.php.net to get a copy of this message
See http://br2.php.net/manual/en/function.create-function.php Regards, Igor Escobar Systems Analyst & Interface Designer + http://blog.igorescobar.com + http://www.igorescobar.com + @igorescobar (twitter) On Tue, Mar 30, 2010 at 10:23 AM, David Otton < phpmail@jawbone.freeserve.co.uk> wrote: > On 30 March 2010 14:16, Andre Polykanine <andre@oire.org> wrote: > > > I need a quoted_printable_encode function but it's available only > > since PHP 5.3. How do I redefine that function only if PHP version is > > lower than 5.3? > > function_exists(). > > if (!function_exists('myfunc')) { > function myfunc() { > ; > } > } > > http://uk3.php.net/function_exists > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#303620) next »