3v4l.org

run code in 300+ PHP versions simultaneously
<?php $states = '1,2,3'; $statesArray = explode(',',$states); if(in_array('2',$statesArray)) { echo 'bestseller'; } if(in_array('1',$statesArray)) { echo 'newproduct'; }

preferences:
43.32 ms | 402 KiB | 5 Q