3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach ($data as $key => $row) { $volume[$key] = $row['volume']; $edition[$key] = $row['edition']; } print_r($volume); // Sort the data with volume descending, edition ascending // Add $data as the last parameter, to sort by the common key array_multisort($volume, SORT_DESC, $edition, SORT_ASC, $data); print_r($data);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $data in /in/7J95D on line 2 Warning: foreach() argument must be of type array|object, null given in /in/7J95D on line 2 Warning: Undefined variable $volume in /in/7J95D on line 6 Fatal error: Uncaught TypeError: array_multisort(): Argument #1 ($array) must be an array or a sort flag in /in/7J95D:9 Stack trace: #0 /in/7J95D(9): array_multisort(NULL, 3, NULL, 4, NULL) #1 {main} thrown in /in/7J95D on line 9
Process exited with code 255.

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:
36.38 ms | 402 KiB | 8 Q