3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $signexceptions = array('2' => 'Z','1' => 'P'); $code = '100'; foreach($signexceptions as $se => $type){ //checken als code begint met exception en mag maar 1 keer checken if( strpos($code,$se) === 0){ echo $se.' YES'; } else{ echo $se.' NO'; } }
based on Y8gSM
Output for 4.3.0 - 7.1.7
2 NO1 NO