3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'sample {} test {} string {}'; $count = 0; echo preg_replace_callback("~{}~", function($m) use (&$count) { return '(' . $count++ . ')'; }, $string);

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.00.0130.00920.17
8.4.150.0020.00014.05
8.4.140.0130.00917.65
8.4.130.0050.00417.90
8.4.120.0150.00520.35
8.4.110.0150.00718.53
8.4.100.0110.00917.98
8.4.90.0110.00820.84
8.4.80.0110.00920.37
8.4.70.0080.01318.77
8.4.60.0090.01120.55
8.4.50.0140.00817.98
8.4.40.0060.00917.88
8.4.30.0070.01020.39
8.4.20.0090.00918.04
8.4.10.0060.00319.80
8.3.280.0080.01120.90
8.3.270.0130.00716.84
8.3.260.0110.00816.75
8.3.250.0110.00919.04
8.3.240.0140.00716.75
8.3.230.0120.00716.91
8.3.220.0060.00320.80
8.3.210.0100.00816.52
8.3.200.0030.00516.81
8.3.190.0130.00517.15
8.3.180.0100.00817.25
8.3.170.0100.00716.66
8.3.160.0100.00916.66
8.3.150.0110.00817.07
8.3.140.0000.00716.80
8.3.130.0160.00318.41
8.3.120.0090.00019.09
8.3.110.0030.00620.94
8.3.100.0030.00624.06
8.3.90.0110.00026.77
8.3.80.0060.00316.63
8.3.70.0040.01416.88
8.3.60.0180.00018.40
8.3.50.0090.00924.49
8.3.40.0120.00319.05
8.3.30.0100.00718.70
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0030.00526.16
8.2.290.0110.00717.06
8.2.280.0070.00718.14
8.2.270.0130.00616.98
8.2.260.0030.00619.16
8.2.250.0120.00316.45
8.2.240.0060.00316.75
8.2.230.0090.00022.58
8.2.220.0170.00337.54
8.2.210.0110.00326.77
8.2.200.0090.00016.63
8.2.190.0150.00618.66
8.2.180.0140.00425.92
8.2.170.0060.00918.96
8.2.160.0030.01022.96
8.2.150.0000.00825.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.89
8.2.110.0060.00320.38
8.2.100.0080.00817.84
8.2.90.0000.00818.22
8.2.80.0030.00518.03
8.2.70.0040.00417.63
8.2.60.0040.00418.04
8.2.50.0050.00318.07
8.2.40.0040.00420.86
8.2.30.0040.00418.03
8.2.20.0070.00018.14
8.2.10.0000.00819.39
8.2.00.0050.00219.31
8.1.330.0060.00416.45
8.1.320.0120.00718.14
8.1.310.0090.00616.70
8.1.300.0090.00018.07
8.1.290.0090.00018.88
8.1.280.0070.01025.92
8.1.270.0050.00323.99
8.1.260.0050.00326.35
8.1.250.0030.00528.09
8.1.240.0100.00521.77
8.1.230.0030.00922.20
8.1.220.0000.00817.79
8.1.210.0070.00318.77
8.1.200.0040.00417.47
8.1.190.0080.00017.38
8.1.180.0050.00318.10
8.1.170.0040.00418.73
8.1.160.0000.00718.96
8.1.150.0040.00418.79
8.1.140.0050.00220.76
8.1.130.0070.00020.20
8.1.120.0030.00517.50
8.1.110.0030.00517.50
8.1.100.0080.00017.50
8.1.90.0080.00017.46
8.1.80.0040.00417.59
8.1.70.0000.00717.53
8.1.60.0040.00417.77
8.1.50.0040.00417.68
8.1.40.0040.00417.62
8.1.30.0080.00417.79
8.1.20.0080.00017.70
8.1.10.0040.00817.55
8.1.00.0080.00017.61
8.0.300.0050.00219.86
8.0.290.0000.00716.75
8.0.280.0070.00018.37
8.0.270.0030.00318.14
8.0.260.0070.00020.13
8.0.250.0040.00417.12
8.0.240.0000.00617.11
8.0.230.0000.00717.05
8.0.220.0040.00416.92
8.0.210.0040.00417.02
8.0.200.0000.00616.95
8.0.190.0040.00417.07
8.0.180.0070.00417.02
8.0.170.0030.00616.97
8.0.160.0040.00417.03
8.0.150.0040.00417.00
8.0.140.0040.00417.00
8.0.130.0060.00013.45
8.0.120.0040.00416.96
8.0.110.0050.00216.99
8.0.100.0000.00816.91
8.0.90.0030.00316.83
8.0.80.0060.01117.01
8.0.70.0000.00817.07
8.0.60.0040.00416.88
8.0.50.0050.00317.00
8.0.30.0110.00617.36
8.0.20.0120.01217.37
8.0.10.0150.00917.26
8.0.00.0160.00617.09
7.4.330.0000.00515.55
7.4.320.0060.00016.70
7.4.300.0030.00316.61
7.4.290.0000.00816.72
7.4.280.0030.00516.67
7.4.270.0000.00716.72
7.4.260.0030.00316.78
7.4.250.0000.00716.73
7.4.240.0030.00416.76
7.4.230.0070.00016.86
7.4.220.0010.00616.79
7.4.210.0040.01016.71
7.4.200.0000.00816.70
7.4.150.0210.00016.61
7.4.140.0040.01816.83
7.4.130.0130.00816.77
7.4.120.0210.00016.75
7.4.110.0100.01116.67
7.4.100.0170.01016.50
7.4.90.0180.00516.78
7.4.80.0170.01016.55
7.4.70.0150.01216.71
7.4.60.0080.01516.61
7.4.50.0150.00616.65
7.4.40.0220.00316.48
7.4.30.0190.00316.63
7.4.20.0160.00816.68
7.4.10.0170.00816.21
7.4.00.0130.00616.53
7.3.330.0000.00716.50
7.3.320.0030.00313.29
7.3.310.0030.00316.44
7.3.300.0070.00016.31
7.3.290.0110.00716.45
7.3.270.0060.01516.58
7.3.260.0140.00716.54
7.3.250.0150.00816.43
7.3.240.0170.00716.66
7.3.230.0190.00616.50
7.3.220.0220.00316.26
7.3.210.0130.01016.32
7.3.200.0170.00416.34
7.3.190.0150.00916.18
7.3.180.0150.00916.48
7.3.170.0150.00916.45
7.3.160.0080.01716.36
7.3.150.0150.00816.45
7.3.140.0150.00916.28
7.3.130.0160.00616.24
7.3.120.0110.01116.37
7.3.110.0040.01516.55
7.3.100.0110.01116.49
7.3.90.0120.01316.36
7.3.80.0120.00816.53
7.3.70.0030.01716.36
7.3.60.0120.00816.51
7.3.50.0090.01216.36
7.3.40.0170.00516.45
7.3.30.0150.00416.48
7.3.20.0040.01716.47
7.3.10.0100.01016.33
7.3.00.0120.00816.50

preferences:
41.05 ms | 403 KiB | 5 Q