3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Identity { private $identity; public function __construct($identiy) { $this->identity = $identiy; } public function getIdentity($value) { $func = $this->identity; return $func($value); } } $identity = new Identity(function ($value){ return "1"; }); echo $identity->getIdentity(1);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
249.15 ms | 2574 KiB | 10 Q