Pyh.conf’25: a new PHP conference for the Russian-speaking community

Voting

: max(six, six)?
(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