3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example1 { protected $v1; protected $v2; public function __construct($a, $b) { $this->v1 = $a; $this->v2 = $b; } protected function get_v1() { return $this->v1; } public function get_v2() { return $this->v2; } } echo $v2->get_v2(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $v2 in /in/hm6Ml on line 33 Fatal error: Uncaught Error: Call to a member function get_v2() on null in /in/hm6Ml:33 Stack trace: #0 {main} thrown in /in/hm6Ml on line 33
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:
35.54 ms | 401 KiB | 8 Q