3v4l.org

run code in 300+ PHP versions simultaneously
<?php $params = [ 'subject' => 'Hello 7', // normally third parameter 'pattern' => '/[a-z ]/', // normally first parameter // 'limit' // normally fourth parameter, omitted for this demonstration; the default -1 will be used 'count' => &$counted, // normally fifth parameter // ^-- don't forget to make it modifiable! 'replacement' => '', // normally second parameter ]; echo preg_replace(...$params) . "\n" . $counted;

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.120.0110.00920.67
8.4.110.0040.00518.58
8.4.100.0080.00619.12
8.4.90.0070.00519.05
8.4.80.0120.00818.79
8.4.70.0120.00518.21
8.4.60.0110.01018.58
8.4.50.0100.01018.70
8.4.40.0070.01519.64
8.4.30.0130.00620.15
8.4.20.0070.01317.86
8.4.10.0040.00419.83
8.3.250.0090.00717.26
8.3.240.0120.00716.66
8.3.230.0050.00516.96
8.3.220.0090.00818.85
8.3.210.0110.00716.83
8.3.200.0070.00316.75
8.3.190.0110.00718.96
8.3.180.0060.00417.42
8.3.170.0180.00020.57
8.3.160.0090.00916.82
8.3.150.0090.00920.66
8.3.140.0080.00016.50
8.3.130.0030.00618.41
8.3.120.0030.00620.71
8.3.110.0060.00320.94
8.3.100.0030.00618.40
8.3.90.0000.01526.77
8.3.80.0060.00319.36
8.3.70.0120.00316.88
8.3.60.0140.00018.31
8.3.50.0080.01023.88
8.3.40.0130.00621.98
8.3.30.0160.00018.91
8.3.20.0000.00724.18
8.3.10.0050.00224.66
8.3.00.0080.00026.16
8.2.290.0030.00517.08
8.2.280.0100.00918.30
8.2.270.0090.00917.17
8.2.260.0140.00318.86
8.2.250.0120.00416.80
8.2.240.0060.00317.30
8.2.230.0030.00622.58
8.2.220.0070.00324.06
8.2.210.0040.00426.77
8.2.200.0030.00618.88
8.2.190.0130.00316.60
8.2.180.0070.00725.92
8.2.170.0030.01422.96
8.2.160.0100.00322.96
8.2.150.0070.00025.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.79
8.2.110.0060.00322.30
8.2.100.0040.00817.97
8.2.90.0080.00018.28
8.2.80.0050.00317.97
8.2.70.0030.00517.88
8.2.60.0050.00317.75
8.2.50.0050.00317.88
8.2.40.0000.00817.75
8.2.30.0080.00019.43
8.2.20.0040.00418.02
8.2.10.0000.00819.35
8.2.00.0060.00319.16
8.1.330.0130.00716.49
8.1.320.0100.00916.24
8.1.310.0100.00716.73
8.1.300.0110.00720.06
8.1.290.0100.00330.84
8.1.280.0110.00425.92
8.1.270.0040.00423.99
8.1.260.0000.00926.35
8.1.250.0040.00428.09
8.1.240.0090.00024.03
8.1.230.0090.00322.66
8.1.220.0080.00017.74
8.1.210.0060.00318.91
8.1.200.0090.00017.60
8.1.190.0050.00317.47
8.1.180.0000.00818.10
8.1.170.0040.00417.62
8.1.160.0000.00719.04
8.1.150.0040.00418.90
8.1.140.0000.00720.66
8.1.130.0000.00717.57
8.1.120.0040.00717.61
8.1.110.0090.00017.53
8.1.100.0040.00417.60
8.1.90.0050.00217.48
8.1.80.0070.00317.64
8.1.70.0070.00017.50
8.1.60.0060.00317.65
8.1.50.0000.00817.55
8.1.40.0040.00417.52
8.1.30.0000.00817.79
8.1.20.0040.00417.85
8.1.10.0060.00317.69
8.1.00.0000.00717.54
8.0.300.0070.00021.96
8.0.290.0040.00416.88
8.0.280.0000.00718.50
8.0.270.0000.00816.83
8.0.260.0030.00316.94
8.0.250.0030.00317.05
8.0.240.0040.00417.10
8.0.230.0000.00716.96
8.0.220.0000.00716.91
8.0.210.0050.00316.89
8.0.200.0070.00017.08
8.0.190.0040.00417.11
8.0.180.0020.00517.04
8.0.170.0030.00516.93
8.0.160.0040.00417.03
8.0.150.0030.00416.80
8.0.140.0000.00717.04
8.0.130.0040.00413.41
8.0.120.0000.00816.95
8.0.110.0040.00417.02
8.0.100.0000.00716.92
8.0.90.0000.00817.09
8.0.80.0060.01116.94
8.0.70.0000.00817.04
8.0.60.0040.00416.92
8.0.50.0000.00716.98
8.0.30.0160.00017.29
8.0.20.0170.00917.06
8.0.10.0170.01017.18
8.0.00.0070.01917.05
7.4.330.0000.00515.55
7.4.320.0030.00316.53
7.4.300.0060.00016.52
7.4.290.0030.00316.48
7.4.280.0040.00416.46
7.4.270.0030.00316.54
7.4.260.0000.00716.50
7.4.250.0040.00416.54
7.4.240.0000.00716.48
7.4.230.0000.00716.55
7.4.220.0030.00316.40
7.4.210.0080.01016.54
7.4.200.0000.00716.33
7.4.150.0180.00816.55
7.4.140.0130.01316.46
7.4.130.0070.01116.54
7.4.120.0180.00816.44
7.4.110.0170.00816.54
7.4.100.0080.01416.43
7.4.90.0100.01016.30
7.4.80.0110.01016.43
7.4.70.0190.00616.39
7.4.60.0120.01216.47
7.4.50.0170.00916.30
7.4.40.0170.00916.45
7.4.30.0130.01316.57
7.4.20.0230.00516.34
7.4.10.0190.00716.37
7.4.00.0040.01416.65
7.3.330.0030.00316.36
7.3.320.0050.00012.98
7.3.310.0050.00316.39
7.3.300.0000.00616.15
7.3.290.0090.00816.32
7.3.270.0130.01016.33
7.3.260.0150.00616.28
7.3.250.0150.01216.31
7.3.240.0190.01216.34
7.3.230.0190.00616.45
7.3.220.0140.00516.33
7.3.210.0120.00816.45
7.3.200.0110.00916.49
7.3.190.0160.01016.35
7.3.180.0170.00816.33
7.3.170.0210.00616.41
7.3.160.0220.00616.36
7.3.150.0180.00916.45
7.3.140.0140.01316.41
7.3.130.0110.01316.31
7.3.120.0190.00516.48
7.3.110.0220.00716.26
7.3.100.0170.00916.40
7.3.90.0150.01216.53
7.3.80.0180.01016.21
7.3.70.0240.00616.28
7.3.60.0180.01116.46
7.3.50.0220.00416.37
7.3.40.0130.00816.33
7.3.30.0120.01416.35
7.3.20.0160.00916.30
7.3.10.0160.01116.33
7.3.00.0140.01316.41
7.2.340.0130.01416.44
7.2.330.0230.00516.46
7.2.320.0260.00616.46
7.2.310.0200.01116.41
7.2.300.0190.01616.51
7.2.290.0230.01316.41
7.2.280.0270.00616.41
7.2.270.0220.01216.45
7.2.260.0210.01216.51
7.2.250.0200.01316.37
7.2.240.0260.01016.59
7.2.230.0180.01416.27
7.2.220.0200.00816.53
7.2.210.0140.01216.40
7.2.200.0220.01216.44
7.2.190.0220.00916.39
7.2.180.0200.00716.33
7.2.170.0200.01116.41
7.2.160.0140.01316.35
7.2.150.0170.01216.38
7.2.140.0200.00816.52
7.2.130.0200.01216.32
7.2.120.0300.01016.47
7.2.110.0160.01316.22
7.2.100.0220.01116.43
7.2.90.0430.01316.51
7.2.80.0250.00716.47
7.2.70.0250.00916.53
7.2.60.0210.00716.46
7.2.50.0180.01216.46
7.2.40.0240.00816.48
7.2.30.0270.00616.45
7.2.20.0220.00816.29
7.2.10.0250.01016.37
7.2.00.0270.00716.56

preferences:
170.19 ms | 403 KiB | 5 Q