3v4l.org

run code in 500+ PHP versions simultaneously
<?php // Online PHP compiler to run PHP program online // Print "Start small. Ship something." message echo "Start small. Ship something."; $array = [ 'a' => 'dog', 'b' => 'cat', 'c' => 'cow', 'd' => 'duck', 'e' => 'goose', 'f' => 'elephant' ]; var_dump(array_all($array, function (string $value) { return strlen($value) < 12; })); ?><?php // Online PHP compiler to run PHP program online // Print "Start small. Ship something." message echo "Start small. Ship something."; $array = [ 'a' => 'dog', 'b' => 'cat', 'c' => 'cow', 'd' => 'duck', 'e' => 'goose', 'f' => 'elephant' ]; var_dump(array_all($array, function (string $value) { return strlen($value) < 12; })); ?>
Output for 8.4.1 - 8.4.21, 8.5.0 - 8.5.7
Start small. Ship something.bool(true) Start small. Ship something.bool(true)
Output for 8.2.31, 8.3.0 - 8.3.31
Start small. Ship something. Fatal error: Uncaught Error: Call to undefined function array_all() in /in/L3iVi:16 Stack trace: #0 {main} thrown in /in/L3iVi on line 16
Process exited with code 255.

preferences:
50.71 ms | 744 KiB | 4 Q