PHP 8.5.0 Alpha 1 available for testing

Voting

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

The Note You're Voting On

Nanhe Kumar
11 years ago
<?php
class Parent{
}
class
Child extends Parent{
}
$c = new Child();
echo
get_class($c) //Child
?>
<?php
class Parent{
public function
getClass(){
echo
get_class();
}
}
class
Child extends Parent{
}
$obj = new Child();
$obj->getClass(); //outputs Parent
?>
<?php
class Parent{
public function
getClass(){
echo
get_class($this);
}
}
class
Child extends Parent{
}
$obj = new Child();
$obj->getClass(); // Parent
?>

<< Back to user notes page

To Top