3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array("key" => "net_sale", "value" => "NET SALE CRTN"), array("key" => "productive_calls", "value" => "Productive Calls"), array("key" => "drop_size_value", "value" => "DROP SIZE VALUE"), array("key" => "sku", "value" => "SKU PER BILL"), array("key" => "net_amount", "value" => "Net Amount"), array("key" => "drop_size_crtn", "value" => "DROP SIZE CRTN"), array("key" => "productive_pops", "value" => "PRODUCTIVE POPS"), array("key" => "scheduled_pops", "value" => "SCHEDULED POPS") ); function search($term, $array) { for ($i=0; $i<count($array); $i++) { if ($array[$i]['key'] == $term) return $i; } } echo search("net_amount", $array);
Output for git.master, git.master_jit, rfc.property-hooks
4

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