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.0030.01218.31
8.3.60.0140.00016.50
8.3.50.0150.00521.15
8.3.40.0130.00918.59
8.3.30.0110.00318.76
8.3.20.0050.00220.21
8.3.10.0040.00423.61
8.3.00.0050.00223.56
8.2.190.0070.01016.58
8.2.180.0040.01118.54
8.2.170.0150.00718.87
8.2.160.0150.00022.96
8.2.150.0070.00025.66
8.2.140.0090.00924.66
8.2.130.0000.00719.82
8.2.120.0000.00826.35
8.2.110.0090.00022.07
8.2.100.0110.00017.80
8.2.90.0030.00619.09
8.2.80.0080.00017.97
8.2.70.0060.00317.46
8.2.60.0050.00317.93
8.2.50.0080.00018.07
8.2.40.0050.00322.13
8.2.30.0000.00720.56
8.2.20.0000.00717.74
8.2.10.0000.00718.00
8.2.00.0080.00017.92
8.1.280.0180.00025.92
8.1.270.0080.00421.98
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0050.00522.37
8.1.230.0070.00419.15
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0000.00917.23
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0040.00418.58
8.1.160.0030.00320.66
8.1.150.0040.00418.76
8.1.140.0050.00319.59
8.1.130.0040.00417.63
8.1.120.0000.00717.36
8.1.110.0020.00517.44
8.1.100.0080.00017.38
8.1.90.0040.00417.41
8.1.80.0040.00417.44
8.1.70.0040.00417.44
8.1.60.0030.00517.56
8.1.50.0030.00617.38
8.1.40.0040.00417.36
8.1.30.0040.00417.54
8.1.20.0000.00817.62
8.1.10.0000.00817.55
8.1.00.0000.00817.30
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.34
8.0.270.0030.00317.14
8.0.260.0030.00317.25
8.0.250.0000.00716.98
8.0.240.0040.00416.97
8.0.230.0020.00517.02
8.0.220.0070.00016.96
8.0.210.0070.00016.91
8.0.200.0000.00617.02
8.0.190.0060.00316.96
8.0.180.0020.00516.91
8.0.170.0080.00016.81
8.0.160.0030.00516.97
8.0.150.0050.00316.88
8.0.140.0000.00716.84
8.0.130.0000.00513.37
8.0.120.0030.00516.78
8.0.110.0030.00516.96
8.0.100.0000.00716.77
8.0.90.0000.00716.89
8.0.80.0060.01016.95
8.0.70.0040.00416.77
8.0.60.0040.00416.79
8.0.50.0080.00016.86
8.0.30.0090.00817.13
8.0.20.0080.01017.40
8.0.10.0020.00517.02
8.0.00.0080.01016.84
7.4.330.0030.00316.69
7.4.320.0020.00516.60
7.4.300.0060.00016.37
7.4.290.0030.00316.54
7.4.280.0100.00016.45
7.4.270.0000.00716.37
7.4.260.0000.00716.52
7.4.250.0030.00316.39
7.4.240.0060.00116.47
7.4.230.0040.00416.64
7.4.220.0070.01416.44
7.4.210.0100.00716.57
7.4.200.0000.00716.66
7.4.160.0100.00616.32
7.4.150.0150.00317.40
7.4.140.0080.00917.86
7.4.130.0120.00716.59
7.4.120.0120.00816.36
7.4.110.0100.00716.22
7.4.100.0070.01116.39
7.4.90.0030.01416.39
7.4.80.0110.00619.39
7.4.70.0060.00916.29
7.4.60.0150.00816.39
7.4.50.0040.00716.57
7.4.40.0060.01216.34
7.4.30.0130.01016.37
7.4.10.0070.00716.61
7.4.00.0070.01015.46
7.3.330.0050.00013.00
7.3.320.0000.00513.04
7.3.310.0040.00416.25
7.3.300.0070.00016.19
7.3.290.0030.00316.25
7.3.280.0080.00816.18
7.3.270.0120.00617.40
7.3.260.0060.01116.17
7.3.250.0090.01216.19
7.3.240.0080.01216.21
7.3.230.0090.01216.39
7.3.210.0100.00716.37
7.3.200.0100.01319.39
7.3.190.0120.00816.24
7.3.180.0090.00616.45
7.3.170.0080.01916.28
7.3.160.0120.00616.38
7.3.130.0160.00316.13
7.3.120.0080.01115.62
7.3.110.0080.00715.46
7.3.100.0060.01115.35
7.3.90.0110.00215.62
7.3.80.0070.00615.51
7.3.70.0080.00515.42
7.3.60.0100.00515.40
7.3.50.0080.00815.33
7.3.40.0050.00615.48
7.3.30.0060.00715.41
7.3.20.0040.01117.10
7.3.10.0080.00817.06
7.3.00.0070.00816.99
7.2.330.0140.00416.61
7.2.320.0080.01516.50
7.2.310.0070.01616.52
7.2.300.0140.00716.21
7.2.290.0080.00816.31
7.2.260.0030.01416.40
7.2.250.0030.01515.42
7.2.240.0050.01515.72
7.2.230.0090.00615.62
7.2.220.0070.00615.65
7.2.210.0050.00715.45
7.2.200.0050.00815.71
7.2.190.0110.00815.52
7.2.180.0050.00715.49
7.2.170.0010.00915.45
7.2.160.0080.00416.20
7.2.150.0030.01318.22
7.2.140.0040.00718.16
7.2.130.0040.01117.36
7.2.120.0060.00817.50
7.2.110.0020.01017.46
7.2.100.0070.00417.34
7.2.90.0020.01017.48
7.2.80.0030.01217.37
7.2.70.0050.00717.56
7.2.60.0070.00817.52
7.2.50.0080.00617.48
7.2.40.0030.00917.51
7.2.30.0030.01017.48
7.2.20.0120.00317.30
7.2.10.0110.00417.45
7.2.00.0040.00917.37
7.1.330.0080.00716.51
7.1.320.0040.00916.48
7.1.310.0060.00816.45
7.1.300.0060.01216.58
7.1.290.0030.01016.58
7.1.280.0060.01116.52
7.1.270.0070.00516.41
7.1.260.0060.00416.52
7.1.250.0050.00916.51
7.1.240.0060.00617.20
7.1.230.0000.01217.18
7.1.220.0040.00717.24
7.1.210.0000.01117.35
7.1.200.0080.00317.36
7.1.190.0080.00417.14
7.1.180.0030.01017.29
7.1.170.0110.00317.26
7.1.160.0100.00317.16
7.1.150.0030.00617.13
7.1.140.0100.00717.29
7.1.130.0070.01017.28
7.1.120.0030.01317.23
7.1.110.0070.01117.35
7.1.100.0030.01017.17
7.1.90.0070.00717.31
7.1.80.0000.01217.18
7.1.70.0050.00717.15
7.1.60.0070.01318.19
7.1.50.0100.01625.85
7.1.40.0140.00317.19
7.1.30.0030.01217.33
7.1.20.0080.00617.27
7.1.10.0040.01117.28
7.1.00.0060.04019.83
7.0.330.0030.00716.93
7.0.320.0030.00916.77
7.0.310.0000.01516.71
7.0.300.0030.00616.78
7.0.290.0080.00616.88
7.0.280.0030.00716.86
7.0.270.0060.00617.04
7.0.260.0150.00317.09
7.0.250.0040.01217.12
7.0.240.0070.00716.91
7.0.230.0040.00416.75
7.0.220.0060.00616.95
7.0.210.0040.00717.00
7.0.200.0070.00615.66
7.0.190.0100.00716.90
7.0.180.0100.00016.93
7.0.170.0030.00617.09
7.0.160.0040.00816.94
7.0.150.0000.01016.82
7.0.140.0060.00617.00
7.0.130.0090.00016.97
7.0.120.0070.01017.07
7.0.110.0070.00716.76
7.0.100.0090.00916.97
7.0.90.0080.00816.93
7.0.80.0090.00017.03
7.0.70.0030.01316.84
7.0.60.0050.04419.28
7.0.50.0050.04517.38
7.0.40.0060.04617.55
7.0.30.0160.04217.46
7.0.20.0280.03517.46
7.0.10.0050.03417.58
7.0.00.0060.03317.55
5.6.400.0120.00015.81
5.6.390.0100.00315.61
5.6.380.0070.00415.84
5.6.370.0000.01115.48
5.6.360.0110.00315.83
5.6.350.0090.00615.81
5.6.340.0060.00915.56
5.6.330.0060.00615.59
5.6.320.0100.00615.72
5.6.310.0100.00715.73
5.6.300.0060.00915.85
5.6.290.0060.00915.63
5.6.280.0060.01818.40
5.6.270.0040.00815.57
5.6.260.0070.00715.71
5.6.250.0000.01615.70
5.6.240.0060.01215.73
5.6.230.0030.01015.64
5.6.220.0030.00715.76
5.6.210.0130.02818.01
5.6.200.0080.04316.88
5.6.190.0060.02718.21
5.6.180.0130.03918.16
5.6.170.0070.03018.18
5.6.160.0060.04918.11
5.6.150.0050.03316.81
5.6.140.0070.04317.03
5.6.130.0070.02616.94
5.6.120.0080.04518.38
5.6.110.0030.03318.42
5.6.100.0030.03218.32
5.6.90.0030.02318.30
5.6.80.0070.04618.08
5.6.70.0070.00315.82
5.6.60.0000.01715.80
5.6.50.0070.00715.79
5.6.40.0080.00015.78
5.6.30.0060.00315.59
5.6.20.0060.00615.51
5.6.10.0040.00715.86
5.6.00.0040.01115.58
5.5.380.0080.00315.60
5.5.370.0100.00315.72
5.5.360.0030.00915.79
5.5.350.0150.03518.01
5.5.340.0080.04116.83
5.5.330.0090.02117.94
5.5.320.0180.03318.01
5.5.310.0120.02317.78
5.5.300.0070.04716.72
5.5.290.0100.04316.83
5.5.280.0100.04518.38
5.5.270.0100.03118.28
5.5.260.0070.04518.19
5.5.250.0030.04918.16
5.5.240.0140.03417.97
5.5.230.0050.00515.45
5.5.220.0040.00715.65
5.5.210.0030.01015.24
5.5.200.0030.00615.55
5.5.190.0080.00215.57
5.5.180.0040.01215.68
5.5.170.0040.00815.54
5.5.160.0090.00615.48
5.5.150.0030.01015.58
5.5.140.0030.00815.51
5.5.130.0110.00615.41
5.5.120.0040.00815.65
5.5.110.0040.01115.52
5.5.100.0000.01215.36
5.5.90.0060.01315.42
5.5.80.0080.00815.51
5.5.70.0060.01215.61
5.5.60.0040.00815.36
5.5.50.0040.00815.56
5.5.40.0030.00715.52
5.5.30.0070.00715.30
5.5.20.0070.00715.52
5.5.10.0030.00715.15
5.5.00.0030.01015.43

preferences:
47.08 ms | 401 KiB | 5 Q