3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Man { protected $Vik; protected $Staty; function input($v, $s) { $this->Vik=$v; $this->Staty=$s; } } class Gayduk extends Man { protected $Name; protected $Priz; function input1($n, $p) { $this->Name=$n; $this->Priz=$p; Man::input(); } function printinfo() { echo "$this->Vik"; echo "$this->Staty"; echo "$this->Name"; echo "$this->Priz"; } } $man = new Man(); $rsg = new Gayduk(); $man->input('18', 'Чоловіча'); $rsg->input1('Роман', 'Гайдук'); $rsg->printinfo(); ?>
based on UMvu9
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Man::input(), 0 passed in /in/s70bI on line 20 and exactly 2 expected in /in/s70bI:6 Stack trace: #0 /in/s70bI(20): Man->input() #1 /in/s70bI(35): Gayduk->input1('\xD0\xA0\xD0\xBE\xD0\xBC\xD0\xB0\xD0\xBD', '\xD0\x93\xD0\xB0\xD0\xB9\xD0\xB4\xD1\x83\xD0\xBA') #2 {main} thrown in /in/s70bI on line 6
Process exited with code 255.
Output for 5.3.19 - 7.0.20
Warning: Missing argument 1 for Man::input(), called in /in/s70bI on line 20 and defined in /in/s70bI on line 6 Warning: Missing argument 2 for Man::input(), called in /in/s70bI on line 20 and defined in /in/s70bI on line 6 Notice: Undefined variable: v in /in/s70bI on line 8 Notice: Undefined variable: s in /in/s70bI on line 9 РоманГайдук