3v4l.org

run code in 300+ PHP versions simultaneously
<?php class P { private $x = 0; public function __construct($x){ $this->x = $x; } } var_export(new P('bbqsoda'));

preferences:
32.03 ms | 402 KiB | 5 Q