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 { var $Name; var $Priz; function input1($n, $p) { $this->Name=$n; $this->Priz=$p; } 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 git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Object of class Gayduk could not be converted to string in /in/0GNeW:23 Stack trace: #0 /in/0GNeW(35): Gayduk->printinfo() #1 {main} thrown in /in/0GNeW on line 23
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
60.31 ms | 401 KiB | 8 Q