3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { static private $hackyhack = false; function __construct() { if (self::$hackyhack == false) { throw new Exception("The cure seems worse than the disease."); } self::$hackyhack = false; } static function makeFoo() { self::$hackyhack = true; $instance = new foo(); return $instance; } } $instance = foo::makeFoo();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
153.26 ms | 2733 KiB | 10 Q