3v4l.org

run code in 300+ PHP versions simultaneously
<?php //echo preg_match("/[0-9]*(\.|[0-9]{1})[0-9]{0,2}/","00.00"); $regexp = '[0-9]*(\.|[0-9]{1})[0-9]{0,2}'; echo _match($regexp, array('00.00','salkjfdsklfj')); function _match($regexp,$subject_array) { $match = true; foreach ($subject_array as $subject) { if (!preg_match("/".$regexp."/",$subject)) { $match = false; } } return $match; }

preferences:
39.2 ms | 402 KiB | 5 Q