3v4l.org

run code in 300+ PHP versions simultaneously
<?php function html($value) { return htmlentities($value); } class Foo { function html($value) { return htmlentities($value); } } $value = '123'; $object = new Foo(); htmlentities($value); html($value); $object->html($value); call_user_func('html', $value); call_user_func(array($object, 'html'), $value); call_user_func_array($func, array($value)); call_user_func_array(array($object, 'html'), array($value));

preferences:
41.23 ms | 402 KiB | 5 Q