3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Custom { public $sum = NULL; function __construct() { $this->sum = function ($a, $b) {return $a + $b;}; } } $cl = new stdClass; $cl->sum = function ($a, $b) {return $a + $b;}; $custom = new Custom(); echo ($custom->sum)(44, 44); echo ($cl->sum)(33, 33);

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.00820.11
8.4.150.0020.00014.05
8.4.140.0140.00917.52
8.4.130.0100.00619.55
8.4.120.0040.00422.21
8.4.110.0140.00622.20
8.4.100.0090.01120.84
8.4.90.0100.01118.70
8.4.80.0130.00718.70
8.4.70.0090.00418.04
8.4.60.0120.00818.69
8.4.50.0130.00722.66
8.4.40.0060.01019.36
8.4.30.0130.00717.45
8.4.20.0030.01620.40
8.4.10.0060.00317.84
8.3.280.0180.00418.50
8.3.270.0120.00716.55
8.3.260.0110.00816.78
8.3.250.0050.00418.93
8.3.240.0130.00718.93
8.3.230.0100.00716.63
8.3.220.0110.01019.15
8.3.210.0140.00716.48
8.3.200.0050.00416.63
8.3.190.0050.00516.42
8.3.180.0110.01016.72
8.3.170.0040.01417.18
8.3.160.0090.00916.86
8.3.150.0120.00919.05
8.3.140.0150.00416.55
8.3.130.0060.00918.48
8.3.120.0100.00016.91
8.3.110.0030.00616.53
8.3.100.0100.01016.44
8.3.90.0040.00416.50
8.3.80.0060.00318.30
8.3.70.0170.00318.55
8.3.60.0180.00016.50
8.3.50.0200.00318.16
8.3.40.0120.00318.79
8.3.30.0110.00718.52
8.3.20.0000.00820.85
8.3.10.0030.00721.50
8.3.00.0000.00721.90
8.2.290.0100.00520.40
8.2.280.0120.01118.43
8.2.270.0110.00716.70
8.2.260.0050.00320.90
8.2.250.0040.00416.67
8.2.240.0030.00617.20
8.2.230.0030.00520.94
8.2.220.0090.00024.06
8.2.210.0000.00826.77
8.2.200.0030.00718.16
8.2.190.0130.00316.58
8.2.180.0100.01018.18
8.2.170.0110.00722.96
8.2.160.0070.00722.08
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00420.99
8.2.110.0040.00720.88
8.2.100.0070.00417.66
8.2.90.0080.00018.22
8.2.80.0060.00617.97
8.2.70.0000.00817.93
8.2.60.0000.00818.09
8.2.50.0080.00018.10
8.2.40.0000.00919.16
8.2.30.0040.00419.13
8.2.20.0060.00317.98
8.2.10.0040.00419.37
8.2.00.0040.00418.18
8.1.330.0100.00922.03
8.1.320.0120.00816.34
8.1.310.0110.00718.50
8.1.300.0080.00816.32
8.1.290.0030.00618.88
8.1.280.0070.01025.92
8.1.270.0040.00418.98
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00920.64
8.1.230.0070.00420.93
8.1.220.0000.00817.74
8.1.210.0080.00018.96
8.1.200.0040.00417.48
8.1.190.0000.00817.23
8.1.180.0030.00618.10
8.1.170.0000.00818.50
8.1.160.0030.00518.86
8.1.150.0000.00718.88
8.1.140.0040.00418.90
8.1.130.0030.00620.06
8.1.120.0000.00717.52
8.1.110.0040.00417.37
8.1.100.0000.00717.36
8.1.90.0070.00417.33
8.1.80.0000.00917.36
8.1.70.0040.00417.36
8.1.60.0040.00417.66
8.1.50.0030.00517.54
8.1.40.0100.00017.50
8.1.30.0040.00417.64
8.1.20.0050.00517.58
8.1.10.0040.00417.58
8.1.00.0040.00417.52
8.0.300.0070.00019.97
8.0.290.0040.00416.75
8.0.280.0050.00318.44
8.0.270.0070.00017.18
8.0.260.0000.00618.51
8.0.250.0040.00416.96
8.0.240.0040.00416.96
8.0.230.0000.00716.92
8.0.220.0000.00916.81
8.0.210.0000.00716.71
8.0.200.0060.00317.02
8.0.190.0040.00416.84
8.0.180.0060.00316.91
8.0.170.0060.00316.98
8.0.160.0040.00416.94
8.0.150.0000.00716.77
8.0.140.0040.00416.89
8.0.130.0030.00313.28
8.0.120.0000.00716.82
8.0.110.0040.00416.80
8.0.100.0040.00416.87
8.0.90.0040.00416.81
8.0.80.0090.00916.92
8.0.70.0040.00416.99
8.0.60.0000.00816.95
8.0.50.0050.00217.01
8.0.30.0110.00617.26
8.0.20.0180.00316.96
8.0.10.0040.00416.92
8.0.00.0130.00716.80
7.4.330.0050.00015.55
7.4.320.0060.00016.60
7.4.300.0030.00316.66
7.4.290.0030.00316.52
7.4.280.0040.00416.63
7.4.270.0070.00016.61
7.4.260.0040.00416.48
7.4.250.0070.00016.48
7.4.240.0030.00316.46
7.4.230.0030.00316.39
7.4.220.0040.00416.61
7.4.210.0070.00916.54
7.4.200.0000.00716.43
7.4.160.0090.00816.59
7.4.140.0100.00717.86
7.4.130.0070.01416.46
7.4.120.0030.01316.49
7.4.110.0070.01416.49
7.4.100.0120.00616.34
7.4.90.0160.00716.43
7.4.80.0120.00619.39
7.4.70.0140.00316.68
7.4.60.0110.00616.48
7.4.50.0030.01016.60
7.4.40.0090.00916.45
7.4.00.0070.01115.10
7.3.330.0000.00513.08
7.3.320.0000.00513.26
7.3.310.0000.00716.20
7.3.300.0040.00416.16
7.3.290.0030.00316.31
7.3.280.0140.00716.24
7.3.260.0150.00616.41
7.3.240.0100.00716.38
7.3.230.0140.00316.38
7.3.210.0070.01316.44
7.3.200.0030.01316.50
7.3.190.0120.00916.63
7.3.180.0070.01016.33
7.3.170.0160.00716.30
7.3.160.0080.00816.34
7.3.10.4020.00714.34
7.3.00.3240.00814.79
7.2.330.0150.01216.76
7.2.320.0100.00716.56
7.2.310.0060.01016.80
7.2.300.0110.01116.87
7.2.290.0090.01316.48
7.2.130.2800.00714.90
7.2.120.3670.00314.81
7.2.110.3020.00814.54
7.2.100.3500.00514.78
7.2.90.4030.00314.79
7.2.80.3050.00714.97
7.2.70.3440.01014.98
7.2.60.2590.00814.83
7.2.50.3040.00814.85
7.2.40.3200.00514.81
7.2.30.3910.01114.62
7.2.20.2980.00314.81
7.2.10.3570.00814.81
7.2.00.3000.00814.82
7.1.250.2980.01013.78

preferences:
30.01 ms | 403 KiB | 5 Q