3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = function(){ echo $this->getX(); }; class Test { private $x; public function __construct($x) { $this->x = $x; } public function setX($x){ $this->x = $x; } public function getX(){ return $this->x; } } $t1 = new Test(100); $t2 = new Test(600); $f->call($t1); $closure = $f->bindTo($t2); $closure();

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.0090.00916.50
8.3.50.0110.00822.11
8.3.40.0150.00018.71
8.3.30.0040.01118.84
8.3.20.0040.00420.09
8.3.10.0000.00723.65
8.3.00.0080.00017.63
8.2.180.0120.00318.16
8.2.170.0090.00622.96
8.2.160.0100.00720.30
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0080.00026.16
8.2.120.0080.00020.93
8.2.110.0080.00422.23
8.2.100.0040.00817.93
8.2.90.0050.00219.23
8.2.80.0050.00317.97
8.2.70.0050.00317.48
8.2.60.0040.00718.03
8.2.50.0090.00018.07
8.2.40.0040.00421.04
8.2.30.0070.00020.51
8.2.20.0070.00017.74
8.2.10.0080.00017.99
8.2.00.0040.00417.95
8.1.280.0090.00625.92
8.1.270.0090.00023.82
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00320.83
8.1.230.0090.00317.79
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0000.00818.86
8.1.160.0000.00721.93
8.1.150.0000.00718.82
8.1.140.0080.00019.60
8.1.130.0030.00317.64
8.1.120.0000.00717.54
8.1.110.0040.00417.43
8.1.100.0030.00417.46
8.1.90.0040.00417.47
8.1.80.0000.00717.46
8.1.70.0000.00817.35
8.1.60.0030.00517.60
8.1.50.0030.00617.54
8.1.40.0040.00417.50
8.1.30.0080.00417.52
8.1.20.0040.00417.56
8.1.10.0040.00417.45
8.1.00.0040.00417.41
8.0.300.0000.00818.77
8.0.290.0070.00016.75
8.0.280.0030.00518.41
8.0.270.0000.00817.19
8.0.260.0000.00617.29
8.0.250.0000.00817.01
8.0.240.0040.00416.89
8.0.230.0020.00516.86
8.0.220.0000.00716.85
8.0.210.0040.00416.77
8.0.200.0000.00616.98
8.0.190.0060.00316.86
8.0.180.0040.00416.92
8.0.170.0080.00016.80
8.0.160.0000.00716.94
8.0.150.0000.00716.97
8.0.140.0070.00016.75
8.0.130.0050.00013.29
8.0.120.0050.00216.86
8.0.110.0040.00416.81
8.0.100.0030.00517.00
8.0.90.0070.00016.92
8.0.80.0090.00616.88
8.0.70.0050.00316.80
8.0.60.0000.00716.88
8.0.50.0000.00716.79
8.0.30.0120.00717.31
8.0.20.0100.01017.40
8.0.10.0020.00517.02
8.0.00.0090.01016.88
7.4.330.0030.00315.08
7.4.320.0070.00016.42
7.4.300.0000.00616.61
7.4.290.0080.00016.55
7.4.280.0080.00016.49
7.4.270.0040.00416.50
7.4.260.0000.00716.52
7.4.250.0030.00516.38
7.4.240.0020.00516.58
7.4.230.0000.00716.64
7.4.220.0110.00716.64
7.4.210.0060.01016.60
7.4.200.0070.00016.68
7.4.160.0140.00716.51
7.4.150.0070.01017.40
7.4.140.0080.01217.86
7.4.130.0100.00916.63
7.4.120.0120.00516.43
7.4.110.0120.00616.37
7.4.100.0170.00716.57
7.4.90.0100.01016.46
7.4.80.0070.01519.39
7.4.70.0190.00316.68
7.4.60.0070.01016.61
7.4.50.0030.00616.57
7.4.40.0060.01016.59
7.4.30.0110.00616.61
7.4.00.0100.00714.89
7.3.330.0050.00013.30
7.3.320.0050.00013.30
7.3.310.0040.00316.20
7.3.300.0000.00816.21
7.3.290.0030.00316.29
7.3.280.0060.01116.29
7.3.270.0130.00317.40
7.3.260.0100.00716.23
7.3.250.0080.01016.25
7.3.240.0090.00916.42
7.3.230.0140.00316.39
7.3.210.0090.00916.49
7.3.200.0090.01216.21
7.3.190.0000.01616.16
7.3.180.0120.00816.54
7.3.170.0100.00716.54
7.3.160.0090.00616.32
7.3.120.0100.00714.81
7.3.110.0070.01115.01
7.3.100.0100.00314.52
7.3.90.0040.00814.90
7.3.80.0000.01014.43
7.3.70.0070.00714.92
7.3.60.0060.00614.57
7.3.50.0030.00614.64
7.3.40.0040.01114.53
7.3.30.0040.00714.64
7.3.20.0040.01116.63
7.3.10.0040.01216.58
7.3.00.0040.01216.60
7.2.330.0100.00716.41
7.2.320.0180.00016.77
7.2.310.0090.00916.55
7.2.300.0100.00716.75
7.2.290.0070.01016.63
7.2.250.0030.01215.37
7.2.240.0070.01015.01
7.2.230.0030.01315.37
7.2.220.0030.01415.31
7.2.210.0000.01114.99
7.2.200.0030.01314.88
7.2.190.0060.00315.03
7.2.180.0000.00915.13
7.2.170.0060.00914.83
7.2.60.0030.01017.04
7.2.00.0030.01019.60
7.1.330.0060.00915.91
7.1.320.0070.00715.68
7.1.310.0030.00715.94
7.1.300.0070.00715.82
7.1.290.0100.00315.81
7.1.280.0060.00615.65
7.1.270.0000.01315.40
7.1.260.0030.00715.69
7.1.200.0100.00315.66
7.1.70.0040.00417.22
7.1.60.0040.00817.05
7.1.50.0060.01916.96
7.1.00.0030.07722.51
7.0.200.0060.00616.45
7.0.60.0030.04020.00
7.0.50.0100.07717.86
7.0.40.0100.08720.18
7.0.30.0170.04320.06
7.0.20.0300.05720.13
7.0.10.0070.07320.10
7.0.00.0000.04720.14
5.6.280.0000.03721.05
5.6.210.0070.04020.48
5.6.200.0030.04318.12
5.6.190.0100.08020.64
5.6.180.0230.04020.68
5.6.170.0300.07020.39
5.6.160.0200.07020.48
5.6.150.0030.07318.25
5.6.140.0030.08318.27
5.6.130.0100.06318.16
5.6.120.0100.08320.99
5.6.110.0130.08021.04
5.6.100.0070.04721.12
5.6.90.0070.07020.98
5.6.80.0030.08720.37
5.5.350.3770.04320.31
5.5.340.0100.03717.97
5.5.330.0030.08720.43
5.5.320.0300.05320.35
5.5.310.0100.05020.30
5.5.300.0070.08017.95
5.5.290.0070.05717.92
5.5.280.0100.08320.88
5.5.270.0030.04320.88
5.5.260.0070.08320.66
5.5.250.0130.04020.63
5.5.240.0000.08320.27
5.4.450.0300.04719.28
5.4.440.0300.04719.57
5.4.430.0230.05319.61
5.4.420.0230.05719.64
5.4.410.0100.06719.20
5.4.400.0170.05718.77
5.4.390.0270.07719.22
5.4.380.0270.07319.24
5.4.370.0170.06319.13
5.4.360.0270.07018.80
5.4.350.0270.04319.17
5.4.340.0170.05319.22
5.4.320.0170.06319.14
5.4.310.0200.05318.93
5.4.300.0270.05319.21
5.4.290.0300.05718.80
5.4.280.0230.07019.11
5.4.270.0300.04318.92
5.4.260.0230.05719.29
5.4.250.0270.06019.32
5.4.240.0130.05319.32
5.4.230.0100.05719.22
5.4.220.0300.05319.32
5.4.210.0230.04319.16
5.4.200.0200.05018.99
5.4.190.0100.07719.11
5.4.180.0230.06019.18
5.4.170.0270.04019.25
5.4.160.0130.05719.13
5.4.150.0170.05319.10
5.4.140.0300.06316.46
5.4.130.0300.05716.60
5.4.120.0200.05716.56
5.4.110.0170.05316.65
5.4.100.0130.05316.47
5.4.90.0130.05716.26
5.4.80.0270.05016.55
5.4.70.0300.05016.39
5.4.60.0200.04716.48
5.4.50.0200.04716.23
5.4.40.0100.05716.48
5.4.30.0100.05716.51
5.4.20.0270.04016.39
5.4.10.0130.05016.40
5.4.00.0100.05315.72

preferences:
59.39 ms | 401 KiB | 5 Q