3v4l.org

run code in 300+ PHP versions simultaneously
<?php $matrix = [ [11, 12, 13, 14, 15], [21, 22, 23, 24, 25], [31, 32, 33, 34, 35], [41, 42, 43, 44, 45], [51, 52, 53, 54, 55] ]; echo "До:\n"; foreach($matrix as $_) { foreach($_ as $item) echo $item . ' '; echo PHP_EOL; } echo "\n"; for ($i = 0; $i < count($matrix); $i++) { for ($j = $i + 1; $j < count($matrix); $j++) { $temp = $matrix[$i][$j]; $matrix[$i][$j] = $matrix[$j][$i]; $matrix[$j][$i] = $temp; } } echo "После:\n"; foreach($matrix as $innerArray){ foreach($innerArray as $item){ echo $item . ' '; } echo PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
До: 11 12 13 14 15 21 22 23 24 25 31 32 33 34 35 41 42 43 44 45 51 52 53 54 55 После: 11 21 31 41 51 12 22 32 42 52 13 23 33 43 53 14 24 34 44 54 15 25 35 45 55

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