3v4l.org

run code in 300+ PHP versions simultaneously
<?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(); ?>
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
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.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 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 РоманГайдук

preferences:
203.31 ms | 402 KiB | 269 Q