3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datasets = array( // less than 10 entries array('127.0.0.1'=>45, '10.0.0.9'=>32, '172.16.0.4'=>'16'), // more than 10 entries array( '10.0.0.1'=>45, '10.0.0.2'=>44, '10.0.0.3'=>43, '10.0.0.4'=>42, '10.0.0.5'=>41, '10.0.0.6'=>40, '10.0.0.7'=>39, '10.0.0.8'=>38, '10.0.0.9'=>37, '10.0.0.10'=>36, '10.0.0.11'=>35, '10.0.0.12'=>34, '10.0.0.13'=>33, '10.0.0.14'=>32, '10.0.0.15'=>31, '10.0.0.16'=>30 ) ); foreach ($datasets as $all_ips) { arsort($all_ips); $top10 = array_slice($all_ips, 0, 10); var_export($top10); echo "\r\n-----\r\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
array ( '127.0.0.1' => 45, '10.0.0.9' => 32, '172.16.0.4' => '16', ) ----- array ( '10.0.0.1' => 45, '10.0.0.2' => 44, '10.0.0.3' => 43, '10.0.0.4' => 42, '10.0.0.5' => 41, '10.0.0.6' => 40, '10.0.0.7' => 39, '10.0.0.8' => 38, '10.0.0.9' => 37, '10.0.0.10' => 36, ) -----

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