3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2 NO1 NO