View Single Post
Old 01-04-2006, 04:54 AM   PM User | #11
missing-score
Senior Coder


 
missing-score's Avatar
 
Join Date: Jan 2003
Location: UK
Posts: 2,194
Thanks: 0
Thanked 0 Times in 0 Posts
missing-score is on a distinguished road
Quote:
Originally Posted by Velox Letum
No, you can't redelcare functions (to my knowledge). You can declare them if they don't exist though.
No, you cant redeclare functions

If you want to do it like this, do it like I did... give the function a similar name, or create your own class for handling wrapper functions, like so:

PHP Code:

class My {

   function 
file$file$bool_use_include_path false ){
      if( 
function_exists'file' ) ){
         return 
file$file$bool_use_include_path );
      } else {
         
// Do whatever else you want to do...
      
}
   }

}

// and then call

$file My::file"filename.php" ); 
You should only use this for functions you expect not to be available...
missing-score is offline   Reply With Quote