3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function thisCall() { return $this->call(); } public function selfCall() { return self::call(); } public function staticCall() { return static::call(); } public function call() { return 'A'; } } class AB extends A { public function call() { return 'AB'; } } class B extends AB { public function call() { return 'B'; } public function parentCall() { return parent::call(); } } $b = new B; var_dump([ 'this' => $b->thisCall(), 'self' => $b->selfCall(), 'static' => $b->staticCall(), 'b::parent' => $b->parentCall(), ]);
Output for git.master_jit, git.master, rfc.property-hooks
array(4) { ["this"]=> string(1) "B" ["self"]=> string(1) "A" ["static"]=> string(1) "B" ["b::parent"]=> string(2) "AB" }

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:
128.17 ms | 405 KiB | 5 Q