3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match('/(?J)^https:\/\/(?:([^:]*)?(?::(.*))?@)?github.com\/(?<owner>[^\/]+)\/(?:(?:(?<name>.*)\.git)|(?<name>.*))$/', 'https://github.com/toto/titi', $matches); print_r($matches);
based on 1r87q
Output for 4.4.6 - 4.4.9, 5.2.2 - 7.2.6
Array ( [0] => https://github.com/toto/titi [1] => [2] => [owner] => toto [3] => toto [name] => titi [4] => [5] => titi )
Output for 5.2.0 - 5.2.1
Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 54 in /in/UVMTl on line 3
Output for 4.3.11 - 4.4.4, 5.0.0 - 5.1.6
Warning: preg_match(): Compilation failed: unrecognized character after (? at offset 2 in /in/UVMTl on line 3 Array ( )
Output for 4.4.5
Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 54 in /in/UVMTl on line 3 Array ( )
Output for 4.3.0 - 4.3.10
Warning: Compilation failed: unrecognized character after (? at offset 2 in /in/UVMTl on line 3 Array ( )