3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ThingManager { public function __construct(ThingFactory $thingFactory) { $this->thingFactory = $thingFactory; } public function doSomething() { return new $this->thingFactory->create(); } } class ThingFactory { public function create() { return new Thing; } } class Thing {}

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
158.62 ms | 2908 KiB | 8 Q