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)); $ff = function() use(&$g) { return $g(); }; echo $ff();

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.0110.00316.50
8.3.50.0130.00522.08
8.3.40.0040.01118.71
8.3.30.0060.01218.79
8.3.20.0040.00420.19
8.3.10.0040.00423.66
8.3.00.0050.00319.50
8.2.180.0180.00316.88
8.2.170.0130.00322.96
8.2.160.0030.01022.07
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0030.00617.75
8.2.120.0050.00326.35
8.2.110.0000.00920.52
8.2.100.0050.00518.16
8.2.90.0000.00719.17
8.2.80.0000.00817.97
8.2.70.0000.01217.25
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0040.00419.18
8.2.30.0000.00720.51
8.2.20.0000.01017.80
8.2.10.0040.00418.12
8.2.00.0070.00018.16
8.1.280.0040.01525.92
8.1.270.0000.00923.82
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0030.00620.68
8.1.230.0070.00717.66
8.1.220.0030.00517.74
8.1.210.0030.00518.77
8.1.200.0060.00317.25
8.1.190.0040.00417.22
8.1.180.0050.00218.10
8.1.170.0060.00318.67
8.1.160.0000.00722.00
8.1.150.0000.00718.83
8.1.140.0040.00419.55
8.1.130.0070.00017.74
8.1.120.0050.00217.35
8.1.110.0070.00017.28
8.1.100.0040.00417.46
8.1.90.0030.00517.49
8.1.80.0040.00417.36
8.1.70.0070.00017.36
8.1.60.0050.00317.49
8.1.50.0030.00517.42
8.1.40.0040.00417.52
8.1.30.0040.00417.55
8.1.20.0040.00417.64
8.1.10.0000.00817.65
8.1.00.0000.00817.37
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.36
8.0.270.0040.00417.25
8.0.260.0060.00017.25
8.0.250.0080.00016.96
8.0.240.0000.00717.03
8.0.230.0090.00017.02
8.0.220.0030.00316.96
8.0.210.0030.00316.96
8.0.200.0060.00017.00
8.0.190.0040.00716.93
8.0.180.0050.00316.96
8.0.170.0030.00616.86
8.0.160.0030.00517.04
8.0.150.0030.00616.82
8.0.140.0060.00316.85
8.0.130.0060.00013.37
8.0.120.0000.00816.80
8.0.110.0040.00416.85
8.0.100.0090.00016.81
8.0.90.0050.00216.92
8.0.80.0090.00616.90
8.0.70.0070.00016.84
8.0.60.0000.00717.02
8.0.50.0000.00716.91
8.0.30.0120.00717.28
8.0.20.0090.00917.40
8.0.10.0080.00017.06
8.0.00.0110.00716.70
7.4.330.0020.00216.77
7.4.320.0050.00216.60
7.4.300.0070.00016.49
7.4.290.0000.00716.55
7.4.280.0000.00816.54
7.4.270.0070.00016.57
7.4.260.0000.00716.63
7.4.250.0040.00416.35
7.4.240.0010.00616.54
7.4.230.0000.00716.48
7.4.220.0100.01316.53
7.4.210.0080.00516.45
7.4.200.0030.00316.67
7.4.160.0180.00416.54
7.4.150.0120.00617.40
7.4.140.0120.00817.86
7.4.130.0080.00916.58
7.4.120.0140.00716.52
7.4.110.0120.00616.55
7.4.100.0090.00916.42
7.4.90.0100.00716.48
7.4.80.0100.01719.39
7.4.70.0150.00716.52
7.4.60.0090.00816.45
7.4.50.0070.00716.51
7.4.40.0080.00816.68
7.4.30.0030.01516.54
7.4.00.0040.01414.95
7.3.330.0030.00313.44
7.3.320.0030.00313.34
7.3.310.0070.00016.27
7.3.300.0050.00316.24
7.3.290.0050.01016.41
7.3.280.0100.00716.38
7.3.270.0060.01217.40
7.3.260.0120.00616.43
7.3.250.0130.00516.40
7.3.240.0040.01316.47
7.3.230.0140.00316.44
7.3.210.0070.01016.43
7.3.200.0060.01216.61
7.3.190.0100.00716.43
7.3.180.0060.01116.42
7.3.170.0130.00916.45
7.3.160.0130.00216.45
7.2.330.0150.00316.68
7.2.320.0110.00716.72
7.2.310.0060.01816.83
7.2.300.0070.01016.37
7.2.290.0110.01116.65
7.2.60.0030.00516.78
7.2.00.0040.01619.61
7.1.200.0060.00915.73
7.1.100.0030.00617.91
7.1.70.0000.00817.11
7.1.60.0100.01619.48
7.1.50.0080.01216.97
7.1.00.0030.07322.48
7.0.200.0400.00414.66
7.0.60.0130.08020.01
7.0.50.0030.06017.84
7.0.40.0130.08020.11
7.0.30.0130.07020.26
7.0.20.0270.04320.25
7.0.10.0200.05720.10
7.0.00.0000.09320.20
5.6.280.0100.06720.92
5.6.210.0100.07720.52
5.6.200.0070.04318.14
5.6.190.0000.09020.64
5.6.180.0170.05720.61
5.6.170.0300.06720.58
5.6.160.0000.09020.45
5.6.150.0100.07718.20
5.6.140.0030.04018.20
5.6.130.0070.06318.18
5.6.120.0030.04320.99
5.6.110.0070.04020.96
5.6.100.0070.07721.04
5.6.90.0070.08721.14
5.6.80.0030.03720.37
5.5.350.4270.04720.54
5.5.340.0070.07318.05
5.5.330.0030.09020.35
5.5.320.0270.08720.26
5.5.310.0330.07720.28
5.5.300.0070.05017.96
5.5.290.0100.07317.96
5.5.280.0000.05720.89
5.5.270.0070.05720.69
5.5.260.0100.06020.97
5.5.250.0000.04320.62
5.5.240.0200.08020.25

preferences:
51.64 ms | 401 KiB | 5 Q