3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = '1234567890'; if (! preg_match('/((\d{0,6})-)?(\d{1,10})/', $value, $matches)) { echo 'nope'; } print_r($matches); if (!$matches[1]) { echo 'test'; }

preferences:
45.32 ms | 402 KiB | 5 Q