3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testString = '2.1.0'; preg_match('/(\d\.?)+/', $testString, $testResult1); preg_match('/\d.\d.\d/', $testString, $testResult2); var_dump($testResult1); var_dump($testResult2);

preferences:
47.63 ms | 402 KiB | 5 Q