3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = '/X(*MARK:A)Y|X(*MARK:B)Z/'; preg_match($regex, "XY", $matches); echo $matches['MARK'], "\n"; // A preg_match($regex, "XZ", $matches); echo $matches['MARK'], "\n"; // B preg_match($regex, "XP", $matches); echo $matches['MARK'], "\n"; // Should also be B, instead: Notice: Undefined index: MARK

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.0120.00618.20
8.3.60.0120.00316.88
8.3.50.0100.01021.97
8.3.40.0090.01219.09
8.3.30.0120.00319.15
8.3.20.0040.00419.02
8.3.10.0040.00423.66
8.3.00.0040.00422.37
8.2.190.0120.00918.52
8.2.180.0090.00618.54
8.2.170.0110.00722.96
8.2.160.0100.00322.33
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00822.33
8.2.120.0080.00026.35
8.2.110.0070.00320.38
8.2.100.0120.00017.97
8.2.90.0040.00419.15
8.2.80.0050.00518.00
8.2.70.0000.00917.88
8.2.60.0070.00318.05
8.2.50.0000.00818.10
8.2.40.0040.00420.60
8.2.30.0050.00319.34
8.2.20.0000.00817.91
8.2.10.0000.00718.11
8.2.00.0000.00718.02
8.1.280.0120.00325.92
8.1.270.0040.00424.02
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0050.00522.81
8.1.230.0080.00417.64
8.1.220.0000.00817.76
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0080.00017.22
8.1.180.0030.00618.10
8.1.170.0000.00918.69
8.1.160.0000.00722.15
8.1.150.0050.00318.84
8.1.140.0040.00419.59
8.1.130.0000.00717.59
8.1.120.0030.00717.47
8.1.110.0040.00417.51
8.1.100.0000.00817.55
8.1.90.0000.00717.56
8.1.80.0000.00817.43
8.1.70.0080.00017.55
8.1.60.0080.00017.69
8.1.50.0050.00317.58
8.1.40.0080.00417.60
8.1.30.0000.00817.60
8.1.20.0050.00317.81
8.1.10.0030.00517.77
8.1.00.0040.00417.55
8.0.300.0030.00518.77
8.0.290.0000.00716.88
8.0.280.0000.00718.38
8.0.270.0040.00417.28
8.0.260.0050.00317.29
8.0.250.0000.00717.21
8.0.240.0000.00717.16
8.0.230.0040.00417.04
8.0.220.0040.00417.04
8.0.210.0070.00017.00
8.0.200.0000.00717.14
8.0.190.0000.00717.02
8.0.180.0030.00317.05
8.0.170.0030.00517.06
8.0.160.0050.00216.93
8.0.150.0000.00716.89
8.0.140.0030.00316.99
8.0.130.0060.00313.49
8.0.120.0040.00417.02
8.0.110.0040.00417.12
8.0.100.0070.00016.92
8.0.90.0040.00416.91
8.0.80.0060.00916.99
8.0.70.0000.00716.91
8.0.60.0000.00817.03
8.0.50.0040.00417.00
8.0.30.0130.00617.29
8.0.20.0080.01217.44
8.0.10.0000.00817.19
8.0.00.0140.00717.14
7.4.330.0030.00315.08
7.4.320.0030.00316.66
7.4.300.0030.00316.50
7.4.290.0030.00316.70
7.4.280.0050.00616.56
7.4.270.0030.00316.65
7.4.260.0080.00016.57
7.4.250.0070.00016.67
7.4.240.0040.00416.76
7.4.230.0070.00016.63
7.4.220.0060.01216.76
7.4.210.0160.00416.68
7.4.200.0070.00016.64
7.4.160.0070.00916.61
7.4.150.0140.00417.40
7.4.140.0110.01017.86
7.4.130.0110.00716.73
7.4.120.0050.01316.72
7.4.110.0070.01116.77
7.4.100.0100.01016.70
7.4.90.0090.00916.80
7.4.80.0130.00319.39
7.4.70.0130.00316.69
7.4.60.0160.00616.80
7.4.50.0150.00416.82
7.4.40.0070.00916.65
7.4.30.0040.01216.87
7.4.00.0070.00715.25
7.3.330.0000.00613.13
7.3.320.0000.00513.33
7.3.310.0040.00416.24
7.3.300.0070.00016.40
7.3.290.0080.00716.47
7.3.280.0110.00616.37
7.3.270.0140.01017.40
7.3.260.0110.00716.69
7.3.250.0090.00816.59
7.3.240.0120.00716.54
7.3.230.0070.01016.44
7.3.210.0170.00016.34
7.3.200.0060.01316.42
7.3.190.0110.00416.69
7.3.180.0150.00316.45
7.3.170.0200.00016.86
7.3.160.0140.00616.40
7.2.330.0110.00916.65
7.2.320.0060.01316.50
7.2.310.0030.01316.74
7.2.300.0120.00916.71
7.2.290.0100.00716.75
7.2.60.0030.01016.96
7.1.200.0030.00716.02
7.1.70.0080.00017.06
7.1.60.0070.00317.16
7.1.00.0070.07022.46
7.0.200.0000.00916.92
7.0.100.0070.08020.00
7.0.90.0100.08020.00
7.0.80.0130.07020.13
7.0.70.0000.05719.93
7.0.60.0100.07719.91
7.0.50.0100.07020.38
7.0.40.0100.05020.11
7.0.30.0030.05019.95
7.0.20.0100.08320.13
7.0.10.0100.07720.14
7.0.00.0070.08320.08
5.6.250.0030.05320.63
5.6.240.0070.08020.57
5.6.230.0100.07720.63
5.6.220.0070.08020.61
5.6.210.0170.07020.60
5.6.200.0100.07021.02
5.6.190.0070.04721.00
5.6.180.0070.08021.10
5.6.170.0070.08021.04
5.6.160.0170.07321.08
5.6.150.0070.08721.05
5.6.140.0000.09020.98
5.6.130.0070.08321.05
5.6.120.0070.07721.16
5.6.110.0100.08320.87
5.6.100.0000.05721.03
5.6.90.0130.08021.02
5.6.80.0030.07320.31
5.6.70.0170.06720.33
5.6.60.0000.05320.47
5.6.50.0170.07020.43
5.6.40.0130.04320.43
5.6.30.0100.04320.46
5.6.20.0170.07020.40
5.6.10.0100.07720.48
5.6.00.0070.07720.39

preferences:
28.81 ms | 401 KiB | 5 Q