note 31525 deleted from function.array-key-exists by alindeman

From: Date: Sat, 03 May 2003 21:45:42 +0000
Subject: note 31525 deleted from function.array-key-exists by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-47473@lists.php.net to get a copy of this message
for the note above: if functions do not exist in elder PHP versions, you might rather use the function 'function_exists()' to create a transparent equivalent: if ( ! function_exists ( 'array_key_exists' ) ) { function array_key_exists () { // etcetera } } the same applies for all kinds of functions like 'file_contents', 'is_a', etc... useful functions which are implemented only in later versions. To be back- and forward compatible i'd like to suggest you use constructions like this, and keep your code portable and transparent :)

« previous php.notes (#47473) next »