3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sort_subnets($x, $y){ $x_arr = explode('.', $x); $y_arr = explode('.', $y); return $x_arr <=> $y_arr; } $subnet_list = array('192.169.12', '192.167.11', '192.169.14', '192.168.13', '192.167.12', '122.169.15', '192.167.16' ); usort($subnet_list, 'sort_subnets'); print_r($subnet_list);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 122.169.15 [1] => 192.167.11 [2] => 192.167.12 [3] => 192.167.16 [4] => 192.168.13 [5] => 192.169.12 [6] => 192.169.14 )

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:
96.58 ms | 405 KiB | 5 Q