3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "1,5"; $base = array('1'=>'Bread','5'=>'Butter'); $replacements = array_flip( explode(',', $str)); print_r( $replacements);
Output for 4.3.0 - 7.1.0
Array ( [1] => 0 [5] => 1 )