3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * This is fucking stupid */ class ConfusingClass{ /** * Private property */ private $property = 'fucking stupid'; /** * Why does this keep happening? * * @bullshit true */ private function bullshit() { return false; } public function derp() { echo "test: ", $this->property), "\n"; } } 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 5.3.0 - 5.3.27, 5.4.0 - 5.4.18, 5.5.0 - 5.5.2
Parse error: syntax error, unexpected ')', expecting ',' or ';' in /in/4Ul7T on line 22
Process exited with code 255.

preferences:
173.58 ms | 1395 KiB | 57 Q