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)); echo $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.40.0040.01118.55
8.3.30.0070.00718.76
8.3.20.0050.00220.33
8.3.10.0040.00423.33
8.3.00.0040.00419.13
8.2.170.0140.00722.96
8.2.160.0060.00620.45
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00317.63
8.2.120.0000.00826.35
8.2.110.0050.00522.30
8.2.100.0070.00417.84
8.2.90.0080.00019.16
8.2.80.0040.00817.97
8.2.70.0050.00317.50
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0050.00319.76
8.2.30.0000.00818.07
8.2.20.0030.00617.71
8.2.10.0030.00518.20
8.2.00.0040.00418.06
8.1.270.0000.00922.05
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0030.00619.14
8.1.230.0070.00417.77
8.1.220.0000.00817.79
8.1.210.0030.00518.77
8.1.200.0030.00617.48
8.1.190.0050.00317.22
8.1.180.0000.00818.10
8.1.170.0000.00718.61
8.1.160.0000.00818.96
8.1.150.0030.00618.86
8.1.140.0040.00419.60
8.1.130.0000.00717.71
8.1.120.0000.00717.38
8.1.110.0000.00717.48
8.1.100.0040.00417.45
8.1.90.0040.00417.41
8.1.80.0040.00417.46
8.1.70.0030.00317.44
8.1.60.0040.00417.48
8.1.50.0050.00317.50
8.1.40.0080.00017.53
8.1.30.0000.00817.67
8.1.20.0040.00417.58
8.1.10.0050.00217.58
8.1.00.0040.00417.38
8.0.300.0070.00018.77
8.0.290.0000.00716.88
8.0.280.0000.00718.38
8.0.270.0050.00317.27
8.0.260.0000.00617.11
8.0.250.0030.00517.04
8.0.240.0070.00017.00
8.0.230.0000.00816.96
8.0.220.0000.00616.94
8.0.210.0070.00016.79
8.0.200.0040.00417.06
8.0.190.0070.00316.94
8.0.180.0060.00316.94
8.0.170.0040.00416.86
8.0.160.0080.00016.97
8.0.150.0030.00516.91
8.0.140.0040.00716.84
8.0.130.0070.00013.41
8.0.120.0000.00716.93
8.0.110.0000.00716.96
8.0.100.0050.00216.96
8.0.90.0000.00716.91
8.0.80.0090.00617.05
8.0.70.0030.00517.00
8.0.60.0080.00016.84
8.0.50.0040.00416.98
8.0.30.0120.00617.15
8.0.20.0100.01117.40
8.0.10.0000.00716.98
8.0.00.0060.01016.69
7.4.330.0060.00016.82
7.4.320.0060.00016.42
7.4.300.0060.00016.44
7.4.290.0040.00416.63
7.4.280.0000.00816.43
7.4.270.0000.00716.50
7.4.260.0070.00016.36
7.4.250.0040.00416.45
7.4.240.0020.00516.56
7.4.230.0000.00716.71
7.4.220.0080.01216.54
7.4.210.0040.01116.46
7.4.200.0030.00316.35
7.4.160.0150.00616.56
7.4.150.0140.00317.40
7.4.140.0140.00517.86
7.4.130.0040.01216.52
7.4.120.0090.00816.58
7.4.110.0160.00316.40
7.4.100.0090.00916.51
7.4.90.0060.00916.64
7.4.80.0190.00019.39
7.4.70.0100.01316.42
7.4.60.0100.00716.65
7.4.50.0060.00916.39
7.4.40.0100.01016.55
7.4.30.0090.00916.70
7.4.00.0080.00915.07
7.3.330.0050.00013.21
7.3.320.0050.00013.44
7.3.310.0000.00716.27
7.3.300.0040.00416.32
7.3.290.0100.00616.38
7.3.280.0140.00516.40
7.3.270.0000.01717.40
7.3.260.0080.00816.37
7.3.250.0140.00316.32
7.3.240.0160.00616.50
7.3.230.0040.01416.39
7.3.210.0100.00716.30
7.3.200.0000.01616.31
7.3.190.0070.01016.46
7.3.180.0210.00716.44
7.3.170.0060.00916.61
7.3.160.0110.00616.32
7.3.120.0090.00614.74
7.3.110.0110.00614.96
7.3.100.0090.00914.92
7.3.90.0040.01114.91
7.3.80.0100.00314.82
7.3.70.0060.00914.77
7.3.60.0100.00614.84
7.3.50.0100.00314.59
7.3.40.0060.00614.93
7.3.30.0000.01414.98
7.3.20.0070.00716.67
7.3.10.0060.00616.45
7.3.00.0000.01616.61
7.2.330.0150.00316.66
7.2.320.0120.00416.74
7.2.310.0110.00616.83
7.2.300.0080.00816.80
7.2.290.0080.00816.72
7.2.250.0100.01015.17
7.2.240.0070.01015.11
7.2.230.0100.00714.77
7.2.220.0030.00715.24
7.2.210.0030.01314.82
7.2.200.0090.00615.24
7.2.190.0120.00315.04
7.2.180.0000.01714.85
7.2.170.0090.00915.22
7.2.60.0070.00717.02
7.2.00.0060.01319.40
7.1.330.0060.00615.63
7.1.320.0060.00615.71
7.1.310.0030.00715.58
7.1.300.0030.01015.55
7.1.290.0030.01315.70
7.1.280.0100.00015.48
7.1.270.0040.01115.73
7.1.260.0110.00315.46
7.1.200.0070.00715.61
7.1.100.0030.01317.92
7.1.70.0050.00217.13
7.1.60.0100.01419.48
7.1.50.0120.00616.63
7.1.00.0030.07722.54
7.0.200.0150.00614.61
7.0.100.0330.07319.91
7.0.90.0230.08019.85
7.0.80.0130.07319.86
7.0.70.0070.05019.86
7.0.60.0070.07720.05
7.0.50.0370.06720.16
7.0.40.0100.08320.06
7.0.30.0100.09020.19
7.0.20.0170.08020.09
7.0.10.0070.07720.12
7.0.00.0070.09320.07
5.6.280.0030.03721.11
5.6.250.0000.08720.72
5.6.240.0070.04720.64
5.6.230.0030.08720.57
5.6.220.0070.06720.49
5.6.210.0130.08020.61
5.6.200.0070.08721.07
5.6.190.0100.05021.00
5.6.180.0100.07321.02
5.6.170.0130.08021.09
5.6.160.0030.08021.08
5.6.150.0030.08021.03
5.6.140.0030.04721.03
5.6.130.0030.07021.04
5.6.120.0130.07721.12
5.6.110.0070.05021.06
5.6.100.0200.08021.02
5.6.90.0100.08320.93
5.6.80.0070.08020.33
5.6.70.0130.07320.39
5.6.60.0170.07020.39
5.6.50.0030.07720.45
5.6.40.0030.07720.39
5.6.30.0100.04320.50
5.6.20.0100.05720.40
5.6.10.0030.08320.31
5.6.00.0000.05320.29
5.5.380.0100.07720.40
5.5.370.0100.04720.48
5.5.360.0130.07020.42
5.5.350.0100.08320.44
5.5.340.0070.05720.94
5.5.330.0070.08020.81
5.5.320.0100.08020.84
5.5.310.0170.07320.87
5.5.300.0000.06020.93
5.5.290.0100.07320.77
5.5.280.0070.06720.77
5.5.270.0070.05020.80
5.5.260.0130.04720.88
5.5.250.0070.07720.69
5.5.240.0100.03720.22
5.5.230.0130.07720.18
5.5.220.0030.04320.30
5.5.210.0070.06720.26
5.5.200.0030.06320.16
5.5.190.0100.08020.22
5.5.180.0200.06720.16
5.5.160.0070.05320.29
5.5.150.0100.07320.11
5.5.140.0070.07019.98
5.5.130.0100.07320.13
5.5.120.0030.05020.23
5.5.110.0070.03720.00
5.5.100.0030.04020.06
5.5.90.0030.06320.05
5.5.80.0130.06720.17
5.5.70.0030.04720.15
5.5.60.0100.07020.17
5.5.50.0200.06720.15
5.5.40.0070.06019.97
5.5.30.0100.07320.06
5.5.20.0100.04319.91
5.5.10.0030.05320.07
5.5.00.0170.06020.04

preferences:
53.58 ms | 400 KiB | 5 Q