3v4l.org

run code in 500+ PHP versions simultaneously
<?php // usleep()/sleep() with large values are left out: they really sleep on versions that accept them $cases = [ 'array_filter mode 3' => fn () => array_filter([1], null, 3), 'array_change_key_case 2' => fn () => array_change_key_case(['a' => 1], 2), 'pathinfo 3' => fn () => pathinfo('/a/b.c', 3), 'pathinfo 64' => fn () => pathinfo('/a/b.c', 64), 'number_format decimals PHP_INT_MIN' => fn () => number_format(1.5, PHP_INT_MIN), 'sleep -1' => fn () => sleep(-1), 'usleep -1' => fn () => usleep(-1), ]; foreach ($cases as $name => $case) { try { $case(); echo "$name: no error\n"; } catch (\Throwable $e) { echo "$name: ", get_class($e), "\n"; } }
Output for master
array_filter mode 3: ValueError array_change_key_case 2: ValueError pathinfo 3: ValueError pathinfo 64: ValueError number_format decimals PHP_INT_MIN: ValueError sleep -1: ValueError usleep -1: ValueError

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:
23.09 ms | 1167 KiB | 7 Q