3v4l.org

run code in 300+ PHP versions simultaneously
<?php $total = array(); $total[] = array( "id" => 1, "account" => "hello world", "item" => "package", "quantity" => 10 ); $total[] = array( "id" => 2, "account" => "foo", "item" => "world", "quantity" => 100 ); $maxtotal; foreach ($total as $key => $value) { // $value is an array() with id, account, item, quantity $maxtotal = array_search( max($value), $value); // doesn't work } print_r( $maxtotal ); // should print out the array with id=2
Output for git.master, git.master_jit, rfc.property-hooks
item

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