3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'foo barf', "foo bar", "kungfoo bar" ]; var_export(preg_replace('/\bfoo\s+bar\b/', 'fubar', $strings));

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.4.140.0130.00817.82
8.4.130.0120.00818.55
8.4.120.0100.01020.52
8.4.110.0110.00918.92
8.4.100.0120.00818.88
8.4.90.0090.01122.32
8.4.80.0100.01020.41
8.4.70.0120.00718.19
8.4.60.0060.00319.03
8.4.50.0120.00619.57
8.4.40.0170.00319.59
8.4.30.0130.00720.50
8.4.20.0070.01319.77
8.4.10.0060.00320.48
8.3.270.0110.00816.57
8.3.260.0140.00516.70
8.3.250.0090.00917.24
8.3.240.0130.00716.82
8.3.230.0100.01216.57
8.3.220.0030.00418.79
8.3.210.0090.00416.54
8.3.200.0030.00516.60
8.3.190.0030.00516.87
8.3.180.0100.00816.73
8.3.170.0030.00618.73
8.3.160.0120.00618.59
8.3.150.0190.00020.70
8.3.140.0000.01216.55
8.3.130.0100.00018.49
8.3.120.0110.00718.86
8.3.110.0060.00320.94
8.3.100.0090.00024.06
8.3.90.0050.00326.77
8.3.80.0060.00318.30
8.3.70.0090.00616.58
8.3.60.0040.01418.43
8.3.50.0140.00720.13
8.3.40.0090.00919.10
8.3.30.0100.00319.05
8.3.20.0080.00024.18
8.3.10.0060.00324.66
8.3.00.0030.00626.16
8.2.290.0050.00320.29
8.2.280.0120.00420.30
8.2.270.0100.00719.22
8.2.260.0080.00818.75
8.2.250.0060.00616.63
8.2.240.0000.00917.05
8.2.230.0080.00022.58
8.2.220.0160.00337.54
8.2.210.0040.01526.77
8.2.200.0000.00917.00
8.2.190.0140.00716.63
8.2.180.0070.00725.92
8.2.170.0100.01018.77
8.2.160.0050.00922.96
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0090.00026.16
8.2.120.0050.00220.75
8.2.110.0090.00019.39
8.2.100.0040.00817.84
8.2.90.0030.00519.17
8.2.80.0030.00617.97
8.2.70.0030.00617.63
8.2.60.0060.00317.80
8.2.50.0040.00418.07
8.2.40.0080.00018.16
8.2.30.0000.00718.02
8.2.20.0040.00420.32
8.2.10.0050.00217.89
8.2.00.0000.00719.18
8.1.330.0090.00921.79
8.1.320.0050.00517.88
8.1.310.0170.00018.43
8.1.300.0000.00818.05
8.1.290.0030.00730.84
8.1.280.0030.01325.92
8.1.270.0070.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.76
8.1.230.0070.00421.02
8.1.220.0050.00217.74
8.1.210.0030.00618.77
8.1.200.0000.00917.36
8.1.190.0080.00017.35
8.1.180.0050.00318.10
8.1.170.0080.00018.69
8.1.160.0040.00418.84
8.1.150.0000.00718.73
8.1.140.0040.00417.57
8.1.130.0000.00718.76
8.1.120.0080.00017.55
8.1.110.0030.00317.39
8.1.100.0070.00017.55
8.1.90.0030.00617.44
8.1.80.0040.00417.50
8.1.70.0000.00717.43
8.1.60.0040.00417.54
8.1.50.0040.00417.61
8.1.40.0040.00417.51
8.1.30.0030.00617.67
8.1.20.0030.00617.71
8.1.10.0030.00617.54
8.1.00.0050.00517.55
8.0.300.0050.00218.77
8.0.290.0090.00016.75
8.0.280.0090.00018.45
8.0.270.0030.00617.21
8.0.260.0040.00418.36
8.0.250.0030.00316.92
8.0.240.0030.00517.04
8.0.230.0000.00816.98
8.0.220.0000.00816.98
8.0.210.0000.00716.89
8.0.200.0000.00617.04
8.0.190.0000.00717.07
8.0.180.0040.00416.95
8.0.170.0030.00316.87
8.0.160.0000.00917.06
8.0.150.0100.00016.77
8.0.140.0000.00916.83
8.0.130.0030.00616.83
8.0.120.0050.00516.85
8.0.110.0090.00016.93
8.0.100.0060.00616.95
8.0.90.0030.00716.85
8.0.80.0020.00716.87
8.0.70.0030.00516.81
8.0.60.0060.00316.93
8.0.50.0030.00616.85
8.0.30.0060.00316.91
8.0.20.0060.00317.10
8.0.10.0060.00317.08
7.4.330.0030.00315.55
7.4.320.0000.00616.54
7.4.300.0000.00716.63
7.4.290.0040.00416.72
7.4.280.0060.00316.63
7.4.270.0040.00416.65
7.4.260.0030.00616.63
7.4.250.0070.00416.62
7.4.240.0000.01216.65
7.4.230.0030.00616.71
7.4.220.0000.00916.69
7.4.210.0030.00716.53
7.4.200.0070.00216.59
7.4.190.0060.00316.80
7.4.180.0090.00016.61
7.4.160.0030.00616.74
7.4.150.0070.00216.73
7.4.140.0030.00616.66
7.4.130.0120.00016.50
7.4.120.0030.00616.59
7.4.110.0070.00316.62
7.4.100.0060.00316.71
7.4.90.0000.00916.47
7.4.80.0060.00316.47
7.4.70.0110.00016.51
7.4.60.0000.00916.60
7.4.50.0060.00316.45
7.4.40.0040.00416.46
7.4.30.0030.00616.49
7.4.20.0050.00516.53
7.4.10.0030.00516.62
7.4.00.0030.00616.59

preferences:
31.3 ms | 403 KiB | 5 Q