3v4l.org

run code in 300+ PHP versions simultaneously
<?php function yourFunction($text, callable $myFunction) { return $myFunction($text); } $offset = 5; echo yourFunction('Hello World', function($text) use($offset) { return substr($text, $offset); });

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
173.98 ms | 3282 KiB | 10 Q