3v4l.org

run code in 500+ PHP versions simultaneously
<?php $savePath = 'tls://127.0.0.1:6379?auth=password&timeout=2.5'; $tryMatch = preg_match('#(?:(^.*)://)?([^:?]+)(?:\:(\d+))?(\?.+)?#', $savePath, $matches); var_dump($matches);
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.31, 8.4.1 - 8.4.22, 8.5.0 - 8.5.7
array(5) { [0]=> string(46) "tls://127.0.0.1:6379?auth=password&timeout=2.5" [1]=> string(3) "tls" [2]=> string(9) "127.0.0.1" [3]=> string(4) "6379" [4]=> string(26) "?auth=password&timeout=2.5" }

preferences:
89.99 ms | 1156 KiB | 4 Q