3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); $a = [ 0 => 2, 1 => 8, 2 => 10 ]; $b = [ 0 => 5, 1 => 2, 2 => 7 ]; $c = [ 0 => 7, 1 => 4, 2 => 2 ]; function arraysSum(array ...$arrays): array { return array_map(function(array $array): int { return array_sum($array); }, $arrays); } $ar = arraysSum($a,$b,$c); print_r($ar);
Output for rfc.property-hooks, git.master, git.master_jit
Array ( [0] => 20 [1] => 14 [2] => 13 )

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:
110.58 ms | 2668 KiB | 4 Q