static function classExists( $class ) {
try {
$r = new ReflectionClass( $class );
- } catch( ReflectionException $r ) {
+ } catch ( ReflectionException $r ) {
$r = false;
}
return $r !== false;
}
/**
- * Determine wether a method exists within a class, using a method which works
+ * Determine whether a method exists within a class, using a method which works
* under HipHop.
*
* Note that under HipHop when method_exists is given a string for it's class
static function methodExists( $class, $method ) {
try {
$r = new ReflectionMethod( $class, $method );
- } catch( ReflectionException $r ) {
+ } catch ( ReflectionException $r ) {
$r = false;
}
return $r !== false;
static function functionExists( $function ) {
try {
$r = new ReflectionFunction( $function );
- } catch( ReflectionException $r ) {
+ } catch ( ReflectionException $r ) {
$r = false;
}
return $r !== false;