3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ "hello", "hello:me", "hello::me", "::me", "hello::hello::me", ]; foreach ($tests as $test) { preg_match_all($test, '/([^:]+)::(.+)/', $matches); print_r($matches); echo PHP_EOL; }
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: preg_match_all(): Delimiter must not be alphanumeric, backslash, or NUL in /in/RYeZD on line 12 Warning: preg_match_all(): Delimiter must not be alphanumeric, backslash, or NUL in /in/RYeZD on line 12 Warning: preg_match_all(): Delimiter must not be alphanumeric, backslash, or NUL in /in/RYeZD on line 12 Warning: preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/RYeZD on line 12 Warning: preg_match_all(): Delimiter must not be alphanumeric, backslash, or NUL in /in/RYeZD on line 12
Output for 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
Warning: preg_match_all(): Delimiter must not be alphanumeric or backslash in /in/RYeZD on line 12 Warning: preg_match_all(): Delimiter must not be alphanumeric or backslash in /in/RYeZD on line 12 Warning: preg_match_all(): Delimiter must not be alphanumeric or backslash in /in/RYeZD on line 12 Warning: preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/RYeZD on line 12 Warning: preg_match_all(): Delimiter must not be alphanumeric or backslash in /in/RYeZD on line 12
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33
Warning: preg_match_all(): Delimiter must not be alphanumeric or backslash in /in/RYeZD on line 12 Warning: preg_match_all(): Delimiter must not be alphanumeric or backslash in /in/RYeZD on line 12 Warning: preg_match_all(): Delimiter must not be alphanumeric or backslash in /in/RYeZD on line 12 Array ( [0] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => [14] => [15] => ) ) Warning: preg_match_all(): Delimiter must not be alphanumeric or backslash in /in/RYeZD on line 12 Array ( [0] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => [14] => [15] => ) )

preferences:
220.84 ms | 405 KiB | 227 Q