Voting

: max(nine, five)?
(Example: nine)

The Note You're Voting On

Lanselot
16 years ago
Beware if you're omitting the parameter on inherited classes.
It'll return the class name of the method where it's called.

<?php
class A {
function
foo() {
return
get_class();
}
}
class
B extends A {
function
bar() {
return
get_class();
}
}
$instance = new B();
echo
$instance->bar(); //Prints 'B';
echo $instance->foo(); //Prints 'A';
?>

<< Back to user notes page

To Top