PHP 8.5.0 Beta 1 available for testing

Voting

: six minus two?
(Example: nine)

The Note You're Voting On

phoenix at todofixthis dot com
14 years ago
Parent methods (regardless of visibility) are also available to a ReflectionObject. E.g.,

<?php
class ParentObject {
public function
parentPublic( ) {
}

private function
parentPrivate( ) {
}
}

class
ChildObject extends ParentObject {
}

$Instance = new ChildObject();
$Reflector = new ReflectionObject($Instance);

var_dump($Reflector->hasMethod('parentPublic')); // true
var_dump($Reflector->hasMethod('parentPrivate')); // true
?>

<< Back to user notes page

To Top