3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Route { private $target; public function getTarget() { return $this->target; } public function setTarget($target) { $this->target = $target; } } $route = new Route(); $route->setTarget( function(){}); $target = $route->getTarget(); if($target instanceof Closure) { echo 1; }else { echo 0; }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
162.98 ms | 2829 KiB | 9 Q