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 $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.60.0070.00716.38
8.3.50.0040.01118.14
8.3.40.0070.00718.50
8.3.30.0140.00018.71
8.3.20.0040.00420.16
8.3.10.0000.00823.61
8.3.00.0060.00319.38
8.2.180.0100.01018.29
8.2.170.0110.01122.96
8.2.160.0100.00320.52
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0040.00420.89
8.2.110.0090.00020.43
8.2.100.0060.00617.93
8.2.90.0080.00019.09
8.2.80.0050.00317.97
8.2.70.0030.00817.37
8.2.60.0000.00818.05
8.2.50.0050.00318.07
8.2.40.0040.00419.46
8.2.30.0040.00420.55
8.2.20.0090.00017.75
8.2.10.0040.00418.07
8.2.00.0040.00417.98
8.1.280.0040.01125.92
8.1.270.0040.00422.12
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00620.64
8.1.230.0120.00017.64
8.1.220.0030.00517.76
8.1.210.0040.00418.77
8.1.200.0080.00017.35
8.1.190.0030.00517.38
8.1.180.0040.00418.10
8.1.170.0090.00020.29
8.1.160.0040.00422.03
8.1.150.0070.00018.95
8.1.140.0040.00419.51
8.1.130.0030.00317.71
8.1.120.0040.00417.55
8.1.110.0000.00717.37
8.1.100.0050.00317.42
8.1.90.0050.00317.33
8.1.80.0000.00717.53
8.1.70.0070.00017.40
8.1.60.0040.00417.68
8.1.50.0030.00517.52
8.1.40.0040.00417.56
8.1.30.0050.00317.74
8.1.20.0000.00917.66
8.1.10.0040.00417.55
8.1.00.0000.00817.54
8.0.300.0000.00718.77
8.0.290.0050.00216.75
8.0.280.0030.00318.51
8.0.270.0000.00717.27
8.0.260.0040.00417.27
8.0.250.0050.00316.85
8.0.240.0050.00216.94
8.0.230.0050.00316.87
8.0.220.0050.00316.81
8.0.210.0030.00316.84
8.0.200.0030.00316.90
8.0.190.0120.00017.00
8.0.180.0000.00916.98
8.0.170.0080.00016.97
8.0.160.0080.00016.91
8.0.150.0050.00216.89
8.0.140.0070.00416.70
8.0.130.0030.00313.39
8.0.120.0000.00816.75
8.0.110.0000.00716.76
8.0.100.0040.00416.76
8.0.90.0050.00316.84
8.0.80.0090.01216.89
8.0.70.0040.00417.01
8.0.60.0070.00016.79
8.0.50.0050.00516.69
8.0.30.0120.00716.97
8.0.20.0060.01117.40
8.0.10.0070.00017.13
8.0.00.0090.00816.81
7.4.330.0000.00616.84
7.4.320.0070.00016.55
7.4.300.0000.00616.38
7.4.290.0030.00316.61
7.4.280.0040.00416.55
7.4.270.0000.00716.61
7.4.260.0030.00316.47
7.4.250.0040.00416.48
7.4.240.0050.00216.60
7.4.230.0040.00416.41
7.4.220.0080.01616.70
7.4.210.0000.01416.46
7.4.200.0000.00716.68
7.4.160.0150.00816.59
7.4.150.0100.00717.40
7.4.140.0120.00917.86
7.4.130.0110.00616.63
7.4.120.0120.00916.54
7.4.110.0070.01116.53
7.4.100.0190.00016.50
7.4.90.0060.01316.55
7.4.80.0040.01319.39
7.4.70.0130.00316.54
7.4.60.0160.00016.52
7.4.50.0040.01116.43
7.4.40.0210.00916.48
7.4.30.0090.00816.61
7.4.00.0100.00615.01
7.3.330.0000.00513.17
7.3.320.0000.00613.28
7.3.310.0030.00316.29
7.3.300.0040.00416.41
7.3.290.0060.00816.30
7.3.280.0090.00716.29
7.3.270.0100.00717.40
7.3.260.0040.01316.30
7.3.250.0100.00716.43
7.3.240.0100.00716.37
7.3.230.0100.00716.57
7.3.210.0060.00916.23
7.3.200.0130.00316.61
7.3.190.0130.00816.18
7.3.180.0190.01216.24
7.3.170.0100.00716.32
7.3.160.0080.00816.21
7.3.10.0040.00416.47
7.3.00.0030.01316.45
7.2.330.0110.00916.79
7.2.320.0090.00916.41
7.2.310.0080.00916.74
7.2.300.0070.01016.43
7.2.290.0100.01016.82
7.2.130.0080.00416.95
7.2.120.0040.01216.56
7.2.110.0000.01616.55
7.2.100.0030.00716.89
7.2.90.0110.00316.95
7.2.80.0030.00717.07
7.2.70.0030.01016.72
7.2.60.0080.00316.92
7.2.50.0080.00416.80
7.2.40.0000.01417.02
7.2.30.0120.00017.14
7.2.20.0070.00717.20
7.2.10.0000.01316.89
7.2.00.0060.00918.18
7.1.250.0030.00715.70
7.1.200.0000.01315.73
7.1.100.0030.01418.02
7.1.70.0000.00717.13
7.1.60.0040.01819.48
7.1.50.0070.01716.80
7.1.00.0070.07322.36
7.0.200.0320.00314.53
7.0.60.0030.07720.03
7.0.50.0030.07017.82
7.0.40.0100.08020.40
7.0.30.0300.07020.23
7.0.20.0170.04320.33
7.0.10.0100.08320.22
7.0.00.0030.09720.25
5.6.280.0000.06020.88
5.6.210.0070.07320.66
5.6.200.0030.08318.15
5.6.190.0200.06020.41
5.6.180.0330.06720.67
5.6.170.0300.07320.57
5.6.160.0070.05020.50
5.6.150.0070.04018.15
5.6.140.0000.04318.29
5.6.130.0100.07018.17
5.6.120.0100.08021.00
5.6.110.0000.05320.96
5.6.100.0100.08320.98
5.6.90.0030.06320.93
5.6.80.0000.04720.54
5.5.350.1830.02720.45
5.5.340.0100.04317.98
5.5.330.0100.05020.47
5.5.320.0300.06720.35
5.5.310.0270.07720.34
5.5.300.0000.04318.08
5.5.290.0030.07717.97
5.5.280.0030.08020.78
5.5.270.0130.07720.88
5.5.260.0130.07320.65
5.5.250.0170.07020.56
5.5.240.0130.06720.13

preferences:
55.9 ms | 400 KiB | 5 Q