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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone,
Sorry, I've forgotten how to do this...
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?
Would it be valid:
function quoted_printable_encode ($str) {
$x=quoted_printable_encode ($str);
if (!isset($x)) {
// blah blah, alternative code
} else {
return $x;
}
}
Is it valid code or not?)
                         Thanks!


-- 
With best regards from Ukraine,
Andre
Http://oire.org/ - The Fantasy blogs of Oire
Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org
Yahoo! messenger: andre.polykanine; ICQ: 191749952
Twitter: http://twitter.com/m_elensule


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux