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);
Output for git.master_jit, git.master
int(1) Value not numeric array(1) { [0]=> array(8) { [0]=> string(1) "1" [1]=> string(1) "2" [2]=> string(1) "3" [3]=> string(1) "4" [4]=> string(1) "5" [5]=> string(1) "4" [6]=> string(1) "7" [7]=> string(1) "4" } } string(8) "12345474" array(2) { [0]=> string(0) "" [1]=> string(8) "234/5474" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
18.45 ms | 406 KiB | 5 Q