3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ReceiveSomething { public int $target { set; } } class foo implements ReceiveSomething { public int $target; public function __construct() { echo $this->target; } } // emulate new instance $x = new ReflectionClass(foo::class); $instance = $x->newinstancewithoutconstructor(); $instance->target = 1; $instance->__construct();
Output for git.master_jit, git.master
1

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:
138.6 ms | 1002 KiB | 7 Q