3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(preg_match('#[^0-9./]#','/123l/')); if(!preg_match('#[^0-9./]#','/123l/')) { echo "Value is numeric \n"; } else { echo "Value not numeric \n"; } $plate_number = '1234/5474'; preg_match_all('#[0-9]#',$plate_number,$new_plate_number); var_dump($new_plate_number); var_dump(implode('',$new_plate_number[0])); $arr = explode('1',$plate_number); var_dump($arr);

preferences:
27.4 ms | 408 KiB | 5 Q