3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $mylocal = array(['language'=>'english', 'language'=>'french', 'language'=>'dutch']); foreach ($mylocal as $key => $value) { if ($value["language"] != "english" && $value["language"] != "spanish" && $value["language"] != "dutch") { unset($mylocal[$key]); } } var_dump($mylocal);
based on ONrSm
Output for 5.6.0 - 7.3.0beta1
array(1) { [0]=> array(1) { ["language"]=> string(5) "dutch" } }