3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $row = array( 'useless' => 42, 'useful' => 'orange', 'useless_too' => 'banana', 'useful_too' => 'apples'); if (($key = array_search('strawberry', $row)) !== false) { unset($row[$key]); } print_r($row);
Output for 4.3.0 - 7.1.0
Array ( [useless] => 42 [useful] => orange [useless_too] => banana [useful_too] => apples )