3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = "@ ^([\\x20\\t]*)/\\*!\\* (?:[\\x20\\t]*(!?\\w*))? # Start with some indent, a comment with the special marker, then an optional name ((?:[^*]|\\*[^/])*) # Any amount of \"a character that isnt a star, or a star not followed by a / \\*/ # The comment end @mx"; $str = "use hafriedlander\Peg\Parser;\n\nclass FQL extends Parser\Basic\n{\n /*!* FQL\n Quote: !'\\''\"'\n Character: /[^\t\n\r\"]/\n Word: w:('\\\"' | Character)+\n function w(&\$res, \$sub) {\n if ( !isset(\$res['val']) ) \$res['val'] = '';\n \$res['val'] .= \$sub['text'];\n }\n FunctionName: w:/ \w+ /\n function w(&\$res, \$sub) {\n if ( !isset(\$res['val']) ) \$res['val'] = '';\n \$res['val'] .= \$sub['text'];\n }\n Connector: c:/ ((a|A)(n|N)(d|D))|((x|X)(o|O)(r|R))|((o|O)(r|R)) /\n function c(&\$res, \$sub) {\n \$res['val'] = strtolower(\$sub['text']);\n }\n Operand: o:/ !((h|H)(a|A)(s|S))|((h|H)(a|A)(s|S))|!((i|I)(n|N))|((i|I)(n|N))|!=|>=|<=|=|<|> /\n function o(&\$res, \$sub) {\n \$res['val'] = strtolower(\$sub['text']);\n }\n ValueAtom: > (Quote atom:Word Quote | emptyAtom:'\"\"') >\n function atom(&\$res, \$sub) {\n \$res['val'] = \$sub['val'];\n }\n function emptyAtom(&\$res, \$sub) {\n \$res['val'] = \"\";\n }\n ValueList: > '[' > atom:ValueAtom (> ',' > rest:ValueAtom)* > ']' >\n function atom(&\$res, \$sub) {\n \$res['val'] = [\$sub['val']];\n }\n function rest(&\$res, \$sub) {\n \$res['val'][] = \$sub['val'];\n }\n ControlAtom: > Quote '#' atom:Word Quote >\n function atom(&\$res, \$sub) {\n \$res['val'] = \$sub['val'];\n }\n ColumnAtom: > Quote > ':' atom:Word Quote >\n function atom(&\$res, \$sub) {\n \$res['val'] = \$sub['val'];\n }\n FunctionAtom: > fnc:FunctionName > '(' atom:ControlAtom (',' > params:ValueAtom >)* ')' >\n function atom(&\$res, \$sub) {\n \$res['val'] = \$sub['val'];\n }\n function fnc(&\$res, \$sub) {\n \$res['fnc'] = strtolower(\$sub['val']);\n \$res['params'] = [];\n }\n function params(&\$res, \$sub) {\n \$res['params'][] = \$sub['val'];\n }\n Assignment: (control:FunctionAtom | control:ControlAtom | control:ColumnAtom) operand:Operand (value:ValueList | value:ValueAtom)\n Block: > ('(' > block:Statement+ > ')') | block:Assignment\n Statement: (left:Block > connector:Connector > right:Statement) | (left:Block > !Connector)\n */\n}"; preg_match($re, $str, $matches); var_dump($matches);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.70.0070.01518.48
8.3.60.0210.00016.88
8.3.50.0090.01121.37
8.3.40.0110.00418.92
8.3.30.0120.00318.82
8.3.20.0040.00420.38
8.3.10.0130.00623.75
8.3.00.0040.01423.48
8.2.190.0030.01716.75
8.2.180.0160.00618.78
8.2.170.0070.00719.16
8.2.160.0070.00722.96
8.2.150.0000.00825.66
8.2.140.0110.00724.66
8.2.130.0050.00319.83
8.2.120.0050.00326.35
8.2.110.0070.00222.21
8.2.100.0080.00418.05
8.2.90.0030.00519.27
8.2.80.0000.00917.97
8.2.70.0040.00417.63
8.2.60.0000.00817.93
8.2.50.0080.00018.07
8.2.40.0080.00022.45
8.2.30.0050.00220.84
8.2.20.0000.00817.80
8.2.10.0070.00018.20
8.2.00.0070.00318.18
8.1.280.0060.00925.92
8.1.270.0000.01022.07
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0060.00322.55
8.1.230.0080.00319.10
8.1.220.0080.00017.91
8.1.210.0080.00018.77
8.1.200.0070.00317.60
8.1.190.0050.00317.47
8.1.180.0050.00318.10
8.1.170.0030.00518.82
8.1.160.0040.00420.85
8.1.150.0040.00419.04
8.1.140.0030.00519.71
8.1.130.0040.00417.79
8.1.120.0040.00417.63
8.1.110.0040.00417.49
8.1.100.0000.00817.50
8.1.90.0000.00817.59
8.1.80.0030.00717.65
8.1.70.0040.00217.67
8.1.60.0090.00017.78
8.1.50.0060.00317.58
8.1.40.0040.00417.57
8.1.30.0080.00017.70
8.1.20.0040.00417.79
8.1.10.0070.00017.68
8.1.00.0040.00417.69
8.0.300.0000.00718.77
8.0.290.0000.00816.88
8.0.280.0030.00318.38
8.0.270.0030.00317.15
8.0.260.0000.00617.28
8.0.250.0070.00017.09
8.0.240.0000.00717.00
8.0.230.0080.00017.09
8.0.220.0070.00017.12
8.0.210.0020.00517.04
8.0.200.0030.00517.13
8.0.190.0080.00017.14
8.0.180.0000.00717.08
8.0.170.0040.00416.99
8.0.160.0050.00317.06
8.0.150.0040.00417.06
8.0.140.0050.00216.84
8.0.130.0000.00713.49
8.0.120.0040.00417.03
8.0.110.0030.00517.02
8.0.100.0070.00017.05
8.0.90.0000.00716.99
8.0.80.0030.01417.05
8.0.70.0000.00716.93
8.0.60.0040.00417.12
8.0.50.0050.00317.15
8.0.30.0110.00817.15
8.0.20.0130.00517.46
8.0.10.0040.00417.21
8.0.00.0080.01116.86
7.4.330.0050.00016.86
7.4.320.0040.00416.78
7.4.300.0030.00316.79
7.4.290.0040.00416.89
7.4.280.0000.01116.90
7.4.270.0030.00316.69
7.4.260.0040.00416.88
7.4.250.0040.00416.64
7.4.240.0040.00416.84
7.4.230.0020.00516.66
7.4.220.0110.01116.91
7.4.210.0060.00916.82
7.4.200.0040.00416.76
7.4.160.0100.00616.57
7.4.150.0070.01117.40
7.4.140.0160.01217.86
7.4.130.0040.01616.67
7.4.120.0100.00916.67
7.4.110.0080.00816.71
7.4.100.0060.01216.71
7.4.90.0120.00416.77
7.4.80.0090.00919.39
7.4.70.0080.00816.86
7.4.60.0150.00316.93
7.4.50.0030.01316.60
7.4.40.0030.01316.73
7.4.30.0180.00416.75
7.4.10.0090.00615.20
7.4.00.0100.00715.12
7.3.330.0000.00513.08
7.3.320.0050.00013.18
7.3.310.0070.00016.27
7.3.300.0000.00716.33
7.3.290.0050.00316.25
7.3.280.0080.01016.36
7.3.270.0100.01017.40
7.3.260.0110.00616.63
7.3.250.0100.00816.62
7.3.240.0060.01216.31
7.3.230.0060.01316.39
7.3.210.0110.00616.54
7.3.200.0090.00919.39
7.3.190.0090.01216.23
7.3.180.0110.00716.53
7.3.170.0140.00316.39
7.3.160.0170.00016.56
7.3.130.0060.01314.89
7.3.120.0030.01315.16
7.3.110.0090.00914.65
7.3.100.0030.00915.14
7.3.90.0080.00314.96
7.3.80.0030.00615.12
7.3.70.0000.01114.82
7.3.60.0040.00714.98
7.3.50.0100.00314.98
7.3.40.0050.00314.80
7.3.30.0060.00614.77
7.3.20.0070.00716.95
7.3.10.0030.00616.88
7.3.00.0000.01116.91
7.2.330.0070.01316.65
7.2.320.0030.02016.63
7.2.310.0120.00916.46
7.2.300.0100.01516.45
7.2.290.0100.00716.51
7.2.260.0060.01315.12
7.2.250.0100.00715.03
7.2.240.0040.01114.93
7.2.230.0100.00614.86
7.2.220.0100.00615.22
7.2.210.0000.01314.96
7.2.200.0030.01015.13
7.2.190.0040.01114.87
7.2.180.0070.00315.04
7.2.170.0030.00715.13
7.2.160.0000.01615.13
7.2.150.0030.01317.06
7.2.140.0090.00616.85
7.2.130.0060.00916.86
7.2.120.0090.00616.93
7.2.110.0000.00916.62
7.2.100.0100.00317.13
7.2.90.0000.01616.88
7.2.80.0070.00716.80
7.2.70.0040.00716.95
7.2.60.0050.01216.88
7.2.50.0090.00917.02
7.2.40.0030.00917.02
7.2.30.0030.01017.01
7.2.20.0080.00816.93
7.2.10.0030.01216.82
7.2.00.0060.00618.29
7.1.330.0080.00615.79
7.1.320.0110.00015.77
7.1.310.0070.00715.91
7.1.300.0070.00315.89
7.1.290.0000.01215.82
7.1.280.0030.01015.98
7.1.270.0090.00615.76
7.1.260.0040.00416.07
7.1.250.0030.01015.64
7.1.240.0030.00615.89
7.1.230.0060.00315.87
7.1.220.0000.01015.99
7.1.210.0040.00816.06
7.1.200.0100.00315.97
7.1.190.0030.01016.08
7.1.180.0070.01015.86
7.1.170.0080.00815.89
7.1.160.0060.00615.76
7.1.150.0030.00916.06
7.1.140.0030.00715.98
7.1.130.0110.00315.89
7.1.120.0030.00715.84
7.1.110.0070.00715.81
7.1.100.0020.01217.01
7.1.90.0030.01016.01
7.1.80.0030.00915.86
7.1.70.0050.00816.53
7.1.60.0130.00717.46
7.1.50.0090.00916.52
7.1.40.0070.01016.02
7.1.30.0110.00016.02
7.1.20.0030.01015.96
7.1.10.0060.01015.88
7.1.00.0030.04319.23
7.0.330.0030.00915.38
7.0.320.0070.00715.34
7.0.310.0040.00415.55
7.0.300.0030.01315.64
7.0.290.0120.00015.58
7.0.280.0030.00915.48
7.0.270.0060.00915.57
7.0.260.0030.01015.59
7.0.250.0090.00615.23
7.0.240.0060.00915.78
7.0.230.0090.00315.45
7.0.220.0000.00815.27
7.0.210.0030.01015.74
7.0.200.0080.01115.18
7.0.190.0060.00615.46
7.0.180.0060.00815.34
7.0.170.0000.01515.74
7.0.160.0060.00915.43
7.0.150.0100.00315.80
7.0.140.0080.00415.60
7.0.130.0060.00315.62
7.0.120.0060.00315.76
7.0.110.0000.01415.69
7.0.100.0100.00315.67
7.0.90.0080.00315.54
7.0.80.0030.01015.32
7.0.70.0040.00815.58
7.0.60.0050.03918.65
7.0.50.0050.04316.64
7.0.40.0070.04617.02
7.0.30.0180.03816.93
7.0.20.0150.04516.84
7.0.10.0020.04516.94
7.0.00.0150.02516.84
5.6.400.0040.00816.52
5.6.390.0090.00616.20
5.6.380.0050.00516.67
5.6.370.0070.01016.58
5.6.360.0070.00716.56
5.6.350.0080.00316.17
5.6.340.0120.00016.46
5.6.330.0060.00316.22
5.6.320.0060.01316.35
5.6.310.0070.01016.49
5.6.300.0080.00416.33
5.6.290.0070.00716.54
5.6.280.0030.02619.55
5.6.270.0090.00616.51
5.6.260.0130.00316.42
5.6.250.0120.00316.07
5.6.240.0000.01216.71
5.6.230.0070.01016.36
5.6.220.0090.00316.33
5.6.210.0130.04019.44
5.6.200.0110.04318.32
5.6.190.0100.02319.32
5.6.180.0250.04019.61
5.6.170.0130.02519.49
5.6.160.0070.04619.38
5.6.150.0060.02518.31
5.6.140.0020.03918.30
5.6.130.0090.02018.31
5.6.120.0110.02419.68
5.6.110.0130.04019.59
5.6.100.0070.02319.74
5.6.90.0060.02319.62
5.6.80.0060.04419.31
5.6.70.0070.01116.19
5.6.60.0030.01016.16
5.6.50.0030.00715.98
5.6.40.0080.00416.04
5.6.30.0030.01016.25
5.6.20.0090.00316.20
5.6.10.0090.00616.06
5.6.00.0130.00316.30
5.5.380.0070.00716.19
5.5.370.0080.00816.09
5.5.360.0060.00916.39
5.5.350.0190.03919.33
5.5.340.0140.03618.29
5.5.330.0030.02819.31
5.5.320.0320.04119.27
5.5.310.0110.02919.41
5.5.300.0120.04018.02
5.5.290.0060.04918.26
5.5.280.0030.03919.45
5.5.270.0080.02519.62
5.5.260.0090.04319.60
5.5.250.0070.03719.42
5.5.240.0180.03719.06
5.5.230.0060.00616.29
5.5.220.0070.00716.26
5.5.210.0060.00616.34
5.5.200.0000.01616.03
5.5.190.0070.01016.23
5.5.180.0140.00016.16
5.5.170.0030.01016.27
5.5.160.0090.00616.01
5.5.150.0060.00615.81
5.5.140.0000.01416.34
5.5.130.0060.00616.20
5.5.120.0040.01216.11
5.5.110.0070.00716.11
5.5.100.0130.00316.29
5.5.90.0100.00716.14
5.5.80.0070.01016.28
5.5.70.0060.00316.35
5.5.60.0060.00916.16
5.5.50.0110.00416.00
5.5.40.0070.00716.11
5.5.30.0080.00816.33
5.5.20.0090.00916.19
5.5.10.0060.01015.86
5.5.00.0060.00615.90

preferences:
60.77 ms | 401 KiB | 5 Q