3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Hello how [t- are] you [k- today], Sir?'; $types = ['' => 'normal', 't' => 'target', 'k' => 'key']; if ( preg_match_all('~ (?| \[ (?<type>[^]-]+) - \h (?<content>[^]]+) ] | () ([^[]+) ) ~x', $str, $matches, PREG_SET_ORDER) ) { foreach ($matches as &$m) { unset($m[0], $m[1], $m[2]); $m['type'] = $types[$m['type']]; } print_r($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.5.10.0120.00716.68
8.5.00.0160.01519.98
8.4.150.0020.00014.05
8.4.140.0150.00917.99
8.4.130.0080.00618.67
8.4.120.0180.00624.18
8.4.110.0140.00519.02
8.4.100.0140.00717.88
8.4.90.0140.00620.81
8.4.80.0030.00518.59
8.4.70.0110.00721.00
8.4.60.0110.01017.82
8.4.50.0110.00918.61
8.4.40.0160.00317.87
8.4.30.0100.01019.24
8.4.20.0090.00919.71
8.4.10.0060.00317.98
8.3.280.0120.00818.43
8.3.270.0080.01116.77
8.3.260.0110.01016.93
8.3.250.0100.00919.05
8.3.240.0110.00716.98
8.3.230.0070.00316.86
8.3.220.0110.00518.80
8.3.210.0170.00316.70
8.3.200.0050.00416.72
8.3.190.0130.00518.47
8.3.180.0110.00716.66
8.3.170.0000.00816.67
8.3.160.0120.00617.16
8.3.150.0040.01417.16
8.3.140.0090.00618.99
8.3.130.0070.00316.67
8.3.120.0130.00319.16
8.3.110.0040.01118.65
8.3.100.0040.00416.82
8.3.90.0080.00026.77
8.3.80.0100.00017.97
8.3.70.0090.00616.75
8.3.60.0120.00918.43
8.3.50.0240.00518.20
8.3.40.0090.00918.88
8.3.30.0140.00018.77
8.3.20.0000.00821.76
8.3.10.0040.00421.91
8.3.00.0080.00023.65
8.2.290.0120.00817.12
8.2.280.0090.01018.60
8.2.270.0040.00417.00
8.2.260.0060.01216.59
8.2.250.0000.00816.84
8.2.240.0090.00619.11
8.2.230.0030.00620.94
8.2.220.0080.00016.63
8.2.210.0080.00026.77
8.2.200.0030.00618.54
8.2.190.0140.00316.88
8.2.180.0190.00016.63
8.2.170.0180.00722.96
8.2.160.0120.00320.27
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00420.81
8.2.110.0030.00620.41
8.2.100.0110.00017.91
8.2.90.0040.00420.58
8.2.80.0060.00318.04
8.2.70.0000.00817.93
8.2.60.0040.00418.09
8.2.50.0050.00317.88
8.2.40.0040.00419.36
8.2.30.0090.00021.20
8.2.20.0080.00018.15
8.2.10.0000.00718.21
8.2.00.0000.00919.32
8.1.330.0150.00522.11
8.1.320.0150.00416.47
8.1.310.0000.00918.25
8.1.300.0080.01118.19
8.1.290.0090.00030.84
8.1.280.0180.00325.92
8.1.270.0040.00422.20
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0030.00623.59
8.1.230.0040.00820.96
8.1.220.0060.00317.78
8.1.210.0030.00619.09
8.1.200.0130.00017.48
8.1.190.0080.00017.53
8.1.180.0080.00018.10
8.1.170.0000.00818.63
8.1.160.0000.00718.99
8.1.150.0000.00819.06
8.1.140.0000.00719.48
8.1.130.0070.00318.96
8.1.120.0030.00317.70
8.1.110.0030.00717.67
8.1.100.0070.00017.50
8.1.90.0000.00717.52
8.1.80.0000.00717.54
8.1.70.0040.00417.61
8.1.60.0040.00417.73
8.1.50.0030.00517.67
8.1.40.0000.00817.75
8.1.30.0050.00317.84
8.1.20.0040.00417.83
8.1.10.0080.00017.60
8.1.00.0030.00517.72
8.0.300.0040.00419.96
8.0.290.0000.00816.75
8.0.280.0070.00018.54
8.0.270.0030.00317.17
8.0.260.0080.00317.29
8.0.250.0000.00717.02
8.0.240.0040.00417.13
8.0.230.0000.00717.11
8.0.220.0000.00716.99
8.0.210.0000.00717.05
8.0.200.0040.00417.16
8.0.190.0040.00417.11
8.0.180.0040.00416.91
8.0.170.0030.00617.11
8.0.160.0040.00416.95
8.0.150.0080.00017.00
8.0.140.0040.00417.03
8.0.130.0030.00313.44
8.0.120.0050.00217.06
8.0.110.0020.00516.86
8.0.100.0000.00717.05
8.0.90.0070.00017.13
8.0.80.0030.01217.06
8.0.70.0050.00316.90
8.0.60.0040.00416.89
8.0.50.0040.00416.92
8.0.30.0120.00717.23
8.0.20.0130.00617.40
8.0.10.0040.00417.12
8.0.00.0050.01216.85
7.4.330.0030.00315.55
7.4.320.0070.00016.72
7.4.300.0070.00016.79
7.4.290.0030.00316.70
7.4.280.0050.00316.62
7.4.270.0030.00616.83
7.4.260.0070.00016.80
7.4.250.0000.00716.69
7.4.240.0040.00416.83
7.4.230.0020.00516.84
7.4.220.0040.00416.76
7.4.210.0070.01116.71
7.4.200.0070.00016.75
7.4.160.0110.00816.74
7.4.140.0080.01017.86
7.4.130.0100.01016.82
7.4.120.0130.00616.70
7.4.110.0100.00616.84
7.4.100.0080.00816.55
7.4.90.0060.01016.55
7.4.80.0100.01019.39
7.4.70.0060.00916.67
7.4.60.0030.01216.59
7.4.50.0080.00816.64
7.4.40.0060.01016.88
7.4.00.0090.00615.27
7.3.330.0070.00013.22
7.3.320.0060.00013.35
7.3.310.0000.00716.46
7.3.300.0030.00316.54
7.3.290.0000.00716.49
7.3.280.0130.00616.47
7.3.260.0110.00916.55
7.3.240.0110.00816.72
7.3.230.0110.01116.46
7.3.210.0030.01416.74
7.3.200.0040.01216.82
7.3.190.0100.00716.47
7.3.180.0100.00616.62
7.3.170.0070.01416.46
7.3.160.0090.00916.82
7.3.120.0040.01515.10
7.3.110.0120.00314.89
7.3.100.0070.00715.21
7.3.90.0070.00714.93
7.3.80.0060.00914.66
7.3.70.0040.01414.84
7.3.60.0060.00614.81
7.3.50.0150.00014.90
7.3.40.0030.01214.81
7.3.30.0060.00914.99
7.3.20.0030.01416.65
7.3.10.0120.00616.52
7.3.00.0110.00417.02
7.2.330.0100.00716.84
7.2.320.0180.00416.89
7.2.310.0060.01316.70
7.2.300.0080.01416.81
7.2.290.0130.00316.87
7.2.240.0120.00315.13
7.2.230.0060.00915.13
7.2.220.0140.00015.26
7.2.210.0070.01115.14
7.2.200.0090.00914.92
7.2.190.0150.00315.12
7.2.180.0060.01215.30
7.2.170.0100.00715.06
7.2.160.0030.01415.11
7.2.150.0100.00717.05
7.2.140.0060.01217.10
7.2.130.0070.01116.82
7.2.120.0050.00517.14
7.2.110.0030.01317.14
7.2.100.0040.01516.81
7.2.90.0000.01217.07
7.2.80.0060.01217.09
7.2.70.0090.00617.05
7.2.60.0060.00917.10
7.2.50.0040.01517.15
7.2.40.1310.01217.84
7.2.30.1760.00917.54
7.2.20.1900.00917.64
7.2.10.0110.00917.44
7.2.00.0700.00917.64
7.1.330.0000.01515.95
7.1.320.0070.01015.95
7.1.310.0060.00916.11
7.1.300.0060.00816.13
7.1.290.0080.00816.06
7.1.280.0030.00915.98
7.1.270.0120.00415.92
7.1.260.0080.00816.04
7.1.250.0000.01515.99
7.1.200.0070.00715.80
7.1.160.0150.01017.01
7.1.150.0110.01616.89
7.1.140.2270.01317.13
7.1.130.0130.00817.00
7.1.120.0290.01017.13
7.1.110.0160.01016.26
7.1.100.2360.01115.98
7.1.90.0080.01416.22
7.1.80.0130.01016.36
7.1.70.0090.00915.64
7.1.60.0270.01133.56
7.1.50.0700.02233.10
7.1.40.1850.01832.64
7.1.30.1040.01332.93
7.1.20.0380.01432.96
7.1.10.0160.01114.86
7.1.00.2140.01015.27

preferences:
151.84 ms | 403 KiB | 5 Q