3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_every(array $array, callable $fn) { return (boolean)array_product(array_map($fn, $array)); } var_dump( array_every([1, '2', true, []], function($value) { return $value; }) ); var_dump( array_every([1, '2', ''], function($value) { return $value; }) ); //
Output for git.master, git.master_jit
bool(true) bool(false)
Output for rfc.property-hooks
Warning: array_product(): Multiplication is not supported on type array in /in/1D1Ao on line 4 bool(true) Warning: array_product(): Multiplication is not supported on type string in /in/1D1Ao on line 4 bool(false)

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:
95.3 ms | 401 KiB | 8 Q