3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array(111,112,113,114,115); $val = 113; // search $arr for $val … if ( ($dex = array_search($val, $arr)) !== false) { // reconstruct $arr $arr = array_merge(array_slice($arr,0,$dex), array_slice($arr,$dex + 1)); } // 113 removed var_dump($arr);// [0]=> int(111), [1]=> int(112), [2]=> int(114), [3]=>int(115)
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.1.0
array(4) { [0]=> int(111) [1]=> int(112) [2]=> int(114) [3]=> int(115) }
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/8fZOH on line 14
Process exited with code 255.