3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'fdfqsdfqsdf%A%2%B%4%C%D%7sddsdfsdf'; $res = preg_replace_callback(',%.?,', function (array $matches) { if (preg_match(',%\d+,', $matches[0])) { return 'FOO'; } }); echo $res; $res = preg_replace_callback(',%\d+?,', function (array $matches) { return 'FOO'; }); echo $res;

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.60.0170.00318.68
8.3.50.0110.00722.82
8.3.40.0110.00418.57
8.3.30.0140.00018.79
8.3.20.0040.00420.29
8.3.10.0030.00621.49
8.3.00.0000.00820.80
8.2.180.0110.01118.54
8.2.170.0110.00422.96
8.2.160.0100.01019.16
8.2.150.0090.00624.18
8.2.140.0040.00424.66
8.2.130.0040.00420.39
8.2.120.0080.00026.35
8.2.110.0040.00422.14
8.2.100.0110.00417.80
8.2.90.0000.00819.27
8.2.80.0030.00617.97
8.2.70.0050.00317.74
8.2.60.0040.00418.84
8.2.50.0060.00318.10
8.2.40.0030.00620.48
8.2.30.0080.00019.29
8.2.20.0060.00317.65
8.2.10.0050.00218.13
8.2.00.0050.00318.13
8.1.280.0170.00325.92
8.1.270.0030.00523.97
8.1.260.0030.00528.09
8.1.250.0070.00028.09
8.1.240.0030.00621.12
8.1.230.0080.00317.64
8.1.220.0040.00417.79
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0080.00017.35
8.1.180.0000.00818.10
8.1.170.0030.00618.66
8.1.160.0000.01119.06
8.1.150.0000.00718.89
8.1.140.0000.00819.57
8.1.130.0030.00317.67
8.1.120.0000.00717.45
8.1.110.0040.00417.38
8.1.100.0040.00417.39
8.1.90.0040.00417.44
8.1.80.0000.00717.42
8.1.70.0030.00317.50
8.1.60.0000.00817.60
8.1.50.0000.00717.45
8.1.40.0030.00617.47
8.1.30.0000.00917.55
8.1.20.0040.00417.58
8.1.10.0030.00617.54
8.1.00.0040.00417.52
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00818.29
8.0.270.0000.00717.20
8.0.260.0000.00617.08
8.0.250.0030.00316.98
8.0.240.0030.00316.85
8.0.230.0030.00316.97
8.0.220.0000.00716.88
8.0.210.0080.00016.79
8.0.200.0030.00616.98
8.0.190.0070.00517.06
8.0.180.0040.00416.88
8.0.170.0050.00316.91
8.0.160.0040.00416.88
8.0.150.0040.00416.96
8.0.140.0040.00416.80
8.0.130.0060.00013.36
8.0.120.0050.00316.87
8.0.110.0080.00016.96
8.0.100.0040.00416.99
8.0.90.0040.00416.85
8.0.80.0080.00816.93
8.0.70.0000.00816.83
8.0.60.0050.00216.93
8.0.50.0000.00716.82
8.0.30.0120.00617.17
8.0.20.0110.00717.40
8.0.10.0070.00017.04
8.0.00.0060.01316.79
7.4.330.0020.00215.08
7.4.320.0040.00416.51
7.4.300.0060.00016.41
7.4.290.0070.00016.59
7.4.280.0050.00316.65
7.4.270.0050.00316.61
7.4.260.0000.00716.41
7.4.250.0000.00716.48
7.4.240.0000.00716.59
7.4.230.0000.00716.39
7.4.220.0110.01416.59
7.4.210.0060.00816.58
7.4.200.0000.00716.45
7.4.160.0080.00816.50
7.4.150.0110.00617.40
7.4.140.0120.00517.86
7.4.130.0110.00516.49
7.4.120.0130.00616.61
7.4.110.0140.00316.61
7.4.100.0100.01416.54
7.4.90.0090.00916.53
7.4.80.0090.00919.39
7.4.70.0100.00716.45
7.4.60.0060.01016.57
7.4.50.0090.00916.46
7.4.40.0130.00316.60
7.4.30.0130.01016.50
7.4.00.0110.00414.98
7.3.330.0030.00313.35
7.3.320.0000.00613.15
7.3.310.0000.00816.47
7.3.300.0000.00716.23
7.3.290.0030.00316.33
7.3.280.0120.00416.36
7.3.270.0060.01217.40
7.3.260.0170.00816.50
7.3.250.0090.00916.27
7.3.240.0080.00916.42
7.3.230.0100.00716.49
7.3.210.0060.01116.45
7.3.200.0060.01216.70
7.3.190.0130.00316.48
7.3.180.0000.02116.39
7.3.170.0090.00916.49
7.3.160.0030.01516.31
7.3.10.0080.00416.40
7.3.00.0060.01016.70
7.2.330.0070.01016.52
7.2.320.0130.01016.58
7.2.310.0090.00916.78
7.2.300.0090.01516.64
7.2.290.0120.00916.38
7.2.130.0040.00816.83
7.2.120.0000.01216.80
7.2.110.0070.00716.96
7.2.100.0070.01017.01
7.2.90.0040.01116.97
7.2.80.0070.01116.77
7.2.70.0060.00916.86
7.2.60.0110.00416.61
7.2.50.0090.00616.95
7.2.40.0030.00617.13
7.2.30.0000.01417.00
7.2.20.0070.00316.97
7.2.10.0070.00416.75
7.2.00.0050.01018.24
7.1.250.0060.00615.93
7.1.70.0030.00616.89
7.1.60.0060.01019.90
7.1.00.0100.07022.57
7.0.200.0750.00014.66
7.0.70.0600.06019.88
7.0.60.0300.07020.02
7.0.50.0270.06320.32
7.0.40.0300.05320.43
7.0.30.0270.06020.39
7.0.20.0200.06720.31
7.0.10.0170.07020.34
7.0.00.0170.06320.30
5.6.280.0100.07020.90
5.6.220.1600.05720.64
5.6.210.0370.05720.61
5.6.200.0130.06721.09
5.6.190.0230.06321.18
5.6.180.0170.09321.09
5.6.170.0270.06021.04
5.6.160.0270.06721.08
5.6.150.0130.06721.15
5.6.140.0300.06721.02
5.6.130.0300.06321.10
5.6.120.0300.07721.03
5.6.110.0200.06321.07
5.6.100.0230.06321.13
5.6.90.0270.06721.09
5.6.80.0130.06320.42
5.6.70.0530.06720.47
5.6.60.0230.04720.42
5.6.50.0230.05720.42
5.6.40.0130.06020.42
5.6.30.0070.07020.54
5.6.20.0170.05720.44
5.6.10.0230.04720.43
5.6.00.0270.04720.42
5.5.360.0370.06020.48
5.5.350.0300.06020.35
5.5.340.0200.06020.78
5.5.330.0170.07320.91
5.5.320.0300.07720.70
5.5.310.0200.08720.93
5.5.300.0130.06720.90
5.5.290.0170.06720.89
5.5.280.0270.05720.72
5.5.270.0270.05020.93
5.5.260.0070.07320.70
5.5.250.0170.06020.75
5.5.240.0300.05020.18
5.5.230.0200.05320.31
5.5.220.0200.05320.31
5.5.210.0130.06320.34
5.5.200.0200.05320.29
5.5.190.0130.06320.18
5.5.180.0170.06020.23
5.5.160.0200.05020.27
5.5.150.0270.04320.21
5.5.140.0230.05020.07
5.5.130.0200.05320.30
5.5.120.0230.05020.19
5.5.110.0170.05720.32
5.5.100.0200.06320.12
5.5.90.0300.06720.08
5.5.80.0130.06320.01
5.5.70.0100.06720.11
5.5.60.0200.05320.23
5.5.50.0170.05720.14
5.5.40.0070.06320.15
5.5.30.0200.05320.13
5.5.20.0200.05320.11
5.5.10.0230.05320.09
5.5.00.0170.06020.18

preferences:
54.81 ms | 401 KiB | 5 Q