3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php unction f(Osoba $o){ $o->programuj(); } class Osoba { protected $pesel; public function __construct($pesel){ $this-> pesel = $pesel; } public function getPesel(){ return $this -> pesel; } } class Programista extends Osoba{ public function programuj(){ } } $p = new Osoba(76021011673); // fatal error f($p);
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected 'f' (T_STRING) in /in/j75o8 on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/j75o8 on line 3
Process exited with code 255.