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...