3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * This is fucking stupid */ abstract class ConfusingClass{ /** * Private property */ private $property = 'fucking stupid'; /** * Why does this keep happening? * * @bullshit true */ private function bullshit() { return false; } public function derp() { echo static::bullshit(); } } class ConfusedBullshit extends ConfusingClass { private function bullshit() { return $this->property; } } $f = new ConfusedBullshit; $f->derp(); $d = new ReflectionClass('ConfusedBullshit'); var_dump($d); var_dump($d->getProperties());
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to private method ConfusedBullshit::bullshit() from scope ConfusingClass in /in/6tKHO:21 Stack trace: #0 /in/6tKHO(34): ConfusingClass->derp() #1 {main} thrown in /in/6tKHO on line 21
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:
53.05 ms | 401 KiB | 8 Q