3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CString { public static function fun3($str){ return strtoupper($str); } public function fun4($str){ return strtoupper($str); } } class Test { public function fun1(){ echo __FUNCTION__; } public function fun2(){ $a = 'bbb'; echo preg_replace_callback('/.*/', function($find){return $this->fun1();}, 'test'); } } $t = new Test; $t->fun2();

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.0120.00618.43
8.3.50.0100.01221.14
8.3.40.0120.00318.87
8.3.30.0070.00720.39
8.3.20.0040.00420.13
8.3.10.0030.00521.90
8.3.00.0080.00022.42
8.2.180.0160.00618.66
8.2.170.0070.01422.96
8.2.160.0100.00320.21
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.01126.16
8.2.120.0140.00419.66
8.2.110.0090.00022.21
8.2.100.0040.00719.25
8.2.90.0020.00519.10
8.2.80.0000.00819.38
8.2.70.0050.00317.75
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0020.00518.10
8.2.20.0000.00717.88
8.2.10.0000.00818.00
8.2.00.0000.00718.01
8.1.280.0160.00625.92
8.1.270.0080.00024.66
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0040.00423.91
8.1.230.0040.00819.02
8.1.220.0000.00817.77
8.1.210.0080.00418.77
8.1.200.0090.00017.60
8.1.190.0000.00917.51
8.1.180.0040.00419.54
8.1.170.0000.00818.61
8.1.160.0050.00222.16
8.1.150.0050.00318.70
8.1.140.0000.00817.59
8.1.130.0030.00317.87
8.1.120.0000.00717.63
8.1.110.0040.00417.57
8.1.100.0000.00717.65
8.1.90.0000.00717.64
8.1.80.0030.00517.50
8.1.70.0030.00317.59
8.1.60.0000.00817.73
8.1.50.0000.00717.57
8.1.40.0000.00817.69
8.1.30.0070.00017.74
8.1.20.0050.00317.83
8.1.10.0000.00817.75
8.1.00.0020.00517.62
8.0.300.0040.00418.77
8.0.290.0040.00417.16
8.0.280.0040.00418.47
8.0.270.0070.00017.33
8.0.260.0080.00016.94
8.0.250.0070.00017.19
8.0.240.0040.00416.97
8.0.230.0000.00817.03
8.0.220.0000.00717.07
8.0.210.0030.00317.03
8.0.200.0050.00317.14
8.0.190.0070.00317.14
8.0.180.0030.00517.15
8.0.170.0040.00417.04
8.0.160.0070.00017.11
8.0.150.0000.00716.99
8.0.140.0030.00517.07
8.0.130.0030.00313.55
8.0.120.0030.00517.09
8.0.110.0000.00717.04
8.0.100.0000.00817.14
8.0.90.0050.00317.12
8.0.80.0000.01517.03
8.0.70.0070.00017.08
8.0.60.0040.00416.94
8.0.50.0040.00417.00
8.0.30.0110.00717.12
8.0.20.0140.00517.40
8.0.10.0040.00416.97
8.0.00.0090.00916.79
7.4.330.0030.00315.00
7.4.320.0000.00616.74
7.4.300.0070.00016.82
7.4.290.0030.00316.81
7.4.280.0030.00316.60
7.4.270.0080.00016.82
7.4.260.0050.00516.70
7.4.250.0000.00916.73
7.4.240.0020.00516.82
7.4.230.0050.00316.70
7.4.220.0110.00416.66
7.4.210.0080.00816.74
7.4.200.0030.00316.81
7.4.190.0070.00016.59
7.4.160.0100.00716.72
7.4.150.0110.01117.40
7.4.140.0120.00917.86
7.4.130.0100.01016.70
7.4.120.0120.00616.74
7.4.110.0110.00716.86
7.4.100.0130.00916.82
7.4.90.0120.01216.88
7.4.80.0120.01219.39
7.4.70.0040.01416.54
7.4.60.0070.01016.71
7.4.50.0080.00016.49
7.4.40.0030.01022.77
7.4.30.0060.01216.67
7.4.00.0030.01014.96
7.3.330.0060.00013.46
7.3.320.0030.00313.54
7.3.310.0070.00016.51
7.3.300.0030.00316.41
7.3.290.0000.01416.44
7.3.280.0080.00816.49
7.3.270.0090.00817.40
7.3.260.0090.00916.59
7.3.250.0110.00916.74
7.3.240.0170.00616.42
7.3.230.0070.01116.80
7.3.210.0060.01016.69
7.3.200.0130.00619.39
7.3.190.0060.01516.64
7.3.180.0100.00716.40
7.3.170.0060.00916.80
7.3.160.0130.00316.59
7.3.120.0000.01814.88
7.3.10.0090.00916.50
7.3.00.0200.00316.69
7.2.330.0080.01116.96
7.2.320.0060.01616.65
7.2.310.0030.01516.78
7.2.300.0150.00616.81
7.2.290.0100.00716.88
7.2.130.0110.00816.97
7.2.120.0130.00616.70
7.2.110.0090.00616.91
7.2.100.0100.01016.81
7.2.90.0100.00516.83
7.2.80.0100.00917.13
7.2.70.0040.01516.88
7.2.60.0070.01116.68
7.2.50.0120.01317.01
7.2.40.0120.00916.50
7.2.30.0110.00816.61
7.2.20.0110.00616.71
7.2.10.0110.01417.04
7.2.00.0150.00616.62
7.1.250.0060.00615.59
7.1.70.0050.00517.08
7.1.60.0170.00719.43
7.1.50.0070.01517.12
7.1.00.0000.06022.45
7.0.200.0040.00416.81
7.0.140.0000.07721.97
7.0.60.0270.07720.02
7.0.50.0070.08017.82
7.0.40.0100.08719.98
7.0.30.0470.05320.10
7.0.20.0170.08320.14
7.0.10.0000.09020.15
7.0.00.0070.05720.16
5.6.280.0130.06320.87
5.6.210.0170.07320.73
5.6.200.0070.05018.13
5.6.190.0100.04320.58
5.6.180.3500.04720.34
5.6.170.0330.07320.56
5.6.160.0130.06320.56
5.6.150.0030.07018.15
5.6.140.0030.04018.24
5.6.130.0070.08018.23
5.6.120.0070.08321.13
5.6.110.0100.07721.12
5.6.100.0100.07321.14
5.6.90.0000.04321.05
5.6.80.0030.08320.39
5.5.350.0170.03020.49
5.5.340.0070.06718.09
5.5.330.0130.07320.40
5.5.320.0300.07320.38
5.5.310.0270.04020.28
5.5.300.0000.07717.98
5.5.290.0100.07718.02
5.5.280.0030.07020.70
5.5.270.0100.03320.88
5.5.260.0070.08320.76
5.5.250.0000.04320.56
5.5.240.0100.06320.27
5.4.450.0730.06719.58
5.4.440.0100.07019.58
5.4.430.0200.06019.20
5.4.420.0530.04719.63
5.4.410.0700.05319.57
5.4.400.0230.06318.82
5.4.390.0270.06018.73
5.4.380.0270.06318.54
5.4.370.0200.04718.61
5.4.360.0100.05318.77
5.4.350.0150.03712.03
5.4.340.0100.04212.02
5.4.320.0060.03812.51
5.4.310.0070.03912.51
5.4.300.0050.03712.51
5.4.290.0110.03212.50
5.4.280.0080.03312.41
5.4.270.0050.03612.40
5.4.260.0050.03912.41
5.4.250.0030.05719.03
5.4.240.0100.04719.00
5.4.230.0170.04019.00
5.4.220.0130.04718.61
5.4.210.0000.06018.95
5.4.200.0030.05018.96
5.4.190.0130.06318.83
5.4.180.0030.05718.99
5.4.170.0170.04318.94
5.4.160.0130.04718.99
5.4.150.0070.07318.95
5.4.140.0100.04716.37
5.4.130.0100.04716.66
5.4.120.0170.03716.61
5.4.110.0070.05016.44
5.4.100.0030.05016.67
5.4.90.0130.04016.57
5.4.80.0030.05016.69
5.4.70.0070.04716.66
5.4.60.0070.04716.36
5.4.50.0070.07016.51
5.4.40.0130.04016.44
5.4.30.0170.04016.39
5.4.20.0170.04016.62
5.4.10.0030.05716.50
5.4.00.0070.05315.83
5.3.290.0070.04312.80
5.3.280.0070.05014.79
5.3.270.0070.05014.84
5.3.260.0000.06014.70
5.3.250.0070.04714.70
5.3.240.0100.04314.45
5.3.230.0070.05014.75
5.3.220.0070.05014.41
5.3.210.0070.05014.75
5.3.200.0130.05014.71
5.3.190.0030.05014.66
5.3.180.0100.04714.64
5.3.170.0030.05014.79
5.3.160.0100.04314.56
5.3.150.0170.06314.55
5.3.140.0070.04714.55
5.3.130.0130.06714.59
5.3.120.0170.06314.55
5.3.110.0170.05014.64
5.3.100.0070.04714.22
5.3.90.0070.05014.09
5.3.80.0000.05314.20
5.3.70.0070.05014.02
5.3.60.0070.04714.09
5.3.50.0030.05013.98
5.3.40.0000.05313.93
5.3.30.0000.05713.99
5.3.20.0030.05013.87
5.3.10.0070.04313.73
5.3.00.0070.04713.71
5.2.170.0030.04011.11
5.2.160.0100.03311.14
5.2.150.0100.03311.21
5.2.140.0000.04311.20
5.2.130.0030.04011.00
5.2.120.0000.04311.16
5.2.110.0100.03311.06
5.2.100.0070.03311.17
5.2.90.0070.03310.94
5.2.80.0070.03711.32
5.2.70.0100.03311.33
5.2.60.0000.04311.21
5.2.50.0030.04011.25
5.2.40.0130.03011.16
5.2.30.0070.04011.07
5.2.20.0070.03311.04
5.2.10.0030.03710.82
5.2.00.0000.04310.73
5.1.60.0070.03010.09
5.1.50.0070.02710.15
5.1.40.0130.02310.07
5.1.30.0030.03710.45
5.1.20.0000.03710.43
5.1.10.0000.03710.07
5.1.00.0130.03010.16
5.0.50.0070.0238.51
5.0.40.0070.0238.33
5.0.30.0030.0478.28
5.0.20.0000.0278.20
5.0.10.0070.0238.16
5.0.00.0030.0508.36
4.4.90.0000.0236.86
4.4.80.0070.0176.86
4.4.70.0000.0276.86
4.4.60.0000.0236.86
4.4.50.0030.0276.86
4.4.40.0000.0376.86
4.4.30.0030.0206.86
4.4.20.0000.0236.86
4.4.10.0070.0176.86
4.4.00.0000.0336.86
4.3.110.0000.0236.86
4.3.100.0070.0136.86
4.3.90.0030.0206.86
4.3.80.0000.0336.86
4.3.70.0000.0206.86
4.3.60.0000.0206.86
4.3.50.0030.0206.86
4.3.40.0030.0306.86
4.3.30.0000.0206.86
4.3.20.0030.0206.86
4.3.10.0030.0176.86
4.3.00.0130.0207.23

preferences:
44.2 ms | 401 KiB | 5 Q