3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { private $p = 'secret'; function RetVal(){ return $this->p; } } class y { private $q = 'queen'; function RetValue() { return $this->q; } } $f = function() { return (new x)->RetVal(); }; echo $f(),"\n"; $g = function(){ return $this->p; }; $nu = $g->bindto((new x), "x"); echo $nu(),"\n"; echo $g->call((new x)); $g = function(){ return $this->q; }; echo "\n",$g->call((new y));

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.70.0060.00918.18
8.3.60.0110.00716.36
8.3.50.0120.00621.97
8.3.40.0070.00718.67
8.3.30.0110.00318.63
8.3.20.0000.00720.16
8.3.10.0030.00623.65
8.3.00.0040.00419.50
8.2.180.0180.00318.41
8.2.170.0070.01022.96
8.2.160.0070.01022.10
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0000.01117.50
8.2.120.0080.00026.35
8.2.110.0040.00420.47
8.2.100.0120.00017.93
8.2.90.0080.00018.96
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0000.00819.37
8.2.30.0000.00720.67
8.2.20.0040.00417.61
8.2.10.0000.00717.99
8.2.00.0070.00017.98
8.1.280.0120.00325.92
8.1.270.0080.00022.19
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0090.00022.55
8.1.230.0090.00317.65
8.1.220.0090.00017.74
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0030.00620.25
8.1.160.0050.00222.04
8.1.150.0000.00718.89
8.1.140.0000.00819.52
8.1.130.0030.00317.72
8.1.120.0040.00417.53
8.1.110.0000.00817.39
8.1.100.0030.00617.47
8.1.90.0060.00317.53
8.1.80.0000.00717.45
8.1.70.0000.00717.40
8.1.60.0000.00817.58
8.1.50.0040.00417.42
8.1.40.0080.00017.55
8.1.30.0080.00017.71
8.1.20.0040.00417.63
8.1.10.0000.00817.66
8.1.00.0000.00817.51
8.0.300.0080.00018.77
8.0.290.0000.00816.75
8.0.280.0030.00318.41
8.0.270.0040.00417.14
8.0.260.0000.00717.27
8.0.250.0040.00416.89
8.0.240.0000.00816.93
8.0.230.0000.00816.88
8.0.220.0050.00216.83
8.0.210.0000.00816.73
8.0.200.0060.00017.02
8.0.190.0030.00616.96
8.0.180.0080.00016.85
8.0.170.0060.00316.93
8.0.160.0040.00416.90
8.0.150.0000.00816.95
8.0.140.0000.00916.76
8.0.130.0000.00613.40
8.0.120.0030.00516.87
8.0.110.0000.00916.79
8.0.100.0030.00516.68
8.0.90.0000.00816.97
8.0.80.0040.01216.85
8.0.70.0020.00516.93
8.0.60.0000.00716.90
8.0.50.0030.00616.88
8.0.30.0070.01217.19
8.0.20.0080.01017.40
8.0.10.0030.00517.11
8.0.00.0070.00916.72
7.4.330.0020.00216.70
7.4.320.0030.00316.50
7.4.300.0000.00616.59
7.4.290.0000.00716.52
7.4.280.0030.00516.63
7.4.270.0030.00316.52
7.4.260.0030.00316.60
7.4.250.0030.00516.54
7.4.240.0020.00516.58
7.4.230.0030.00316.48
7.4.220.0210.00316.64
7.4.210.0030.01116.61
7.4.200.0050.00216.48
7.4.160.0100.00616.48
7.4.150.0090.00817.40
7.4.140.0100.01217.86
7.4.130.0080.01016.50
7.4.120.0120.00816.58
7.4.110.0090.01216.68
7.4.100.0100.01316.51
7.4.90.0120.00616.43
7.4.80.0060.01719.39
7.4.70.0120.00616.56
7.4.60.0080.00816.50
7.4.50.0040.01116.33
7.4.40.0100.00716.70
7.4.30.0120.01216.70
7.4.00.0030.01214.84
7.3.330.0050.00013.26
7.3.320.0030.00313.30
7.3.310.0070.00016.39
7.3.300.0040.00416.27
7.3.290.0070.00916.32
7.3.280.0090.00816.30
7.3.270.0140.00817.40
7.3.260.0110.00816.26
7.3.250.0100.00916.46
7.3.240.0120.00916.27
7.3.230.0100.00716.39
7.3.210.0100.00616.48
7.3.200.0030.01516.30
7.3.190.0100.00716.47
7.3.180.0060.01016.56
7.3.170.0070.01116.38
7.3.160.0120.00416.35
7.2.330.0080.01116.72
7.2.320.0140.00316.50
7.2.310.0120.00616.83
7.2.300.0120.00416.78
7.2.290.0180.00616.62
7.2.60.0030.00816.87
7.1.200.0040.01115.34
7.1.70.0030.00516.99
7.1.60.0080.01519.48
7.1.50.0060.01216.87
7.1.00.0000.08022.40
7.0.200.0200.00714.57
7.0.60.0170.07319.91
7.0.50.0070.06717.89
7.0.40.0130.08019.96
7.0.30.0100.07320.08
7.0.20.0130.04020.33
7.0.10.0100.08320.10
7.0.00.0100.08320.32
5.6.280.0030.06020.79
5.6.210.0070.08020.61
5.6.200.0070.07018.21
5.6.190.0130.06020.68
5.6.180.0200.04320.34
5.6.170.0200.09320.56
5.6.160.0030.09020.71
5.6.150.0070.08018.19
5.6.140.0000.04318.19
5.6.130.0030.08018.12
5.6.120.0070.05721.01
5.6.110.0170.07320.97
5.6.100.0030.06321.00
5.6.90.0100.06721.14
5.6.80.0030.03720.39
5.5.350.4170.04320.42
5.5.340.0070.05717.95
5.5.330.0100.08320.34
5.5.320.0370.04020.40
5.5.310.0330.05720.31
5.5.300.0030.04318.01
5.5.290.0100.06718.02
5.5.280.0070.05020.91
5.5.270.0030.05320.74
5.5.260.0130.07720.66
5.5.250.0030.07320.59
5.5.240.0130.08020.17

preferences:
53.13 ms | 401 KiB | 5 Q