Ejemplo n.º 1
0
<?php

//Inheritance is taking attributes from a parent
class Mother
{
    public function getEyeCount()
    {
        return 2;
    }
}
class Child extends Mother
{
}
$child = new Child();
var_dump($child->getEyeCount());