3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Stuff { function __invoke() { return 'I am ' . get_class($this) . '.'; } } class Thing { function __invoke() { return 'I am Thing.'; } } class Thang { use Stuff; } $things[] = function () { return 'I am Thong.'; }; $things[] = new Thing; $things[] = new Thang; $things[] = 'strlen'; $things[] = [$thing1, '__invoke']; $things[] = [$thang1, '__invoke']; var_dump(array_map('is_callable'), $things);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $thing1 in /in/MQ4YH on line 10 Warning: Undefined variable $thang1 in /in/MQ4YH on line 11 Fatal error: Uncaught ArgumentCountError: array_map() expects at least 2 arguments, 1 given in /in/MQ4YH:13 Stack trace: #0 /in/MQ4YH(13): array_map('is_callable') #1 {main} thrown in /in/MQ4YH on line 13
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
65.7 ms | 401 KiB | 8 Q