Longhorn PHP 2025 - Call For Papers

Voting

: eight minus zero?
(Example: nine)

The Note You're Voting On

ivo at jansch dot nl
15 years ago
It's very useful to know that you can also use the ReflectionClass to inspect interfaces, even thouth Interfaces are not classes. Example:

<?php

interface Edible
{
public function
eat();
}

$refl = new ReflectionClass("Edible");
$methods = $refl->getMethods();
?>

[Edit by danbrown AT php DOT net - Contains a bugfix by (dbl AT bnet DOT com) on 18-AUG-2010 with the following message: "underline had to be removed for it to work ( new Reflection_Class -> new ReflectionClass )"]

<< Back to user notes page

To Top