3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ob { private $b = false; public function __construct($b=false) { if ($b) $this->b = $b; } public function toString(){ return $b; } } class b {} $x = new b(); $ob = new ob(); $ob2 = new ob(true); var_dump($x, $ob, $ob2);

preferences:
16.33 ms | 402 KiB | 5 Q