3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ protected $stuff = 10; function test(){ return new class($this){ function __construct(A $s){ $this->s = $s; } function asd(){ return (function(){ return $this->s->stuff; })->bindTo($this, A::class)(); } }; } } $x = new A; echo $x->test()->asd();

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.0100.00718.27
8.3.50.0120.00318.18
8.3.40.0100.00718.90
8.3.30.0100.00318.79
8.3.20.0070.00020.35
8.3.10.0040.00420.65
8.3.00.0050.00320.62
8.2.180.0070.01116.75
8.2.170.0040.01122.96
8.2.160.0000.01322.08
8.2.150.0000.01024.18
8.2.140.0080.00024.66
8.2.130.0000.00820.88
8.2.120.0070.00026.35
8.2.110.0030.00719.27
8.2.100.0040.00818.04
8.2.90.0000.00819.18
8.2.80.0030.00617.97
8.2.70.0030.00517.75
8.2.60.0040.00417.80
8.2.50.0060.00318.09
8.2.40.0080.00020.78
8.2.30.0050.00219.49
8.2.20.0000.00817.75
8.2.10.0030.00618.12
8.2.00.0040.00418.05
8.1.280.0090.00925.92
8.1.270.0060.00323.96
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0040.00422.06
8.1.230.0000.01117.83
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0090.00017.25
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0090.00018.53
8.1.160.0040.00420.74
8.1.150.0080.00018.83
8.1.140.0040.00419.57
8.1.130.0040.00417.72
8.1.120.0000.00717.38
8.1.110.0050.00217.53
8.1.100.0050.00317.35
8.1.90.0000.00717.49
8.1.80.0000.00817.51
8.1.70.0000.00917.50
8.1.60.0090.00017.65
8.1.50.0040.00417.43
8.1.40.0100.00017.54
8.1.30.0040.00417.70
8.1.20.0000.00717.44
8.1.10.0040.00417.45
8.1.00.0040.00417.56
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0030.00318.44
8.0.270.0030.00317.21
8.0.260.0000.00617.27
8.0.250.0060.00317.01
8.0.240.0000.00716.93
8.0.230.0040.00417.05
8.0.220.0030.00616.91
8.0.210.0070.00016.85
8.0.200.0000.00616.98
8.0.190.0050.00316.88
8.0.180.0000.00816.89
8.0.170.0050.00217.01
8.0.160.0050.00217.04
8.0.150.0000.00716.85
8.0.140.0000.00716.88
8.0.130.0060.00013.35
8.0.120.0000.00816.95
8.0.110.0000.00716.84
8.0.100.0040.00416.99
8.0.90.0000.00716.89
8.0.80.0110.00416.91
8.0.70.0070.00016.84
8.0.60.0040.00417.02
8.0.50.0000.00717.01
8.0.30.0120.01117.08
8.0.20.0110.01017.40
8.0.10.0030.00516.93
8.0.00.0110.00716.80
7.4.330.0000.00516.70
7.4.320.0060.00016.41
7.4.300.0030.00316.59
7.4.290.0050.00216.52
7.4.280.0050.00216.53
7.4.270.0020.00516.41
7.4.260.0000.00816.51
7.4.250.0000.00816.37
7.4.240.0030.00316.64
7.4.230.0000.00716.71
7.4.220.0070.01016.54
7.4.210.0070.01416.64
7.4.200.0040.00416.42
7.4.160.0000.01516.36
7.4.150.0070.01117.40
7.4.140.0080.01117.86
7.4.130.0090.00916.45
7.4.120.0110.00816.52
7.4.110.0110.00716.41
7.4.100.0140.01016.48
7.4.90.0030.01416.55
7.4.80.0110.00919.39
7.4.70.0120.00316.32
7.4.60.0060.01016.58
7.4.50.0080.00216.66
7.4.40.0070.01016.41
7.4.30.0030.01316.52
7.4.00.0040.01115.10
7.3.330.0000.00613.16
7.3.320.0050.00013.08
7.3.310.0040.00416.36
7.3.300.0030.00316.28
7.3.290.0080.00716.31
7.3.280.0060.01016.30
7.3.270.0070.01717.40
7.3.260.0090.00916.30
7.3.240.0110.00816.39
7.3.230.0110.00916.58
7.3.210.0030.01316.45
7.3.200.0070.00716.28
7.3.190.0170.00016.38
7.3.180.0090.00616.35
7.3.170.0120.00916.52
7.3.160.0090.00916.51
7.2.330.0070.01616.68
7.2.320.0090.01216.64
7.2.310.0060.01216.83
7.2.300.0030.01716.29
7.2.290.0160.00316.78
7.2.60.0100.00717.14
7.2.00.0030.01019.70
7.1.200.0060.00915.71
7.1.100.0140.00018.15
7.1.70.0000.00817.22
7.1.60.0110.01419.27
7.1.50.0120.00917.01
7.1.00.0030.07322.57
7.0.200.0240.00315.04
7.0.60.0170.06321.68
7.0.50.0100.03717.86
7.0.40.0070.05720.30
7.0.30.0100.05020.24
7.0.20.0200.03720.20
7.0.10.0030.08720.10
7.0.00.0070.09020.10
5.6.280.0030.05320.82
5.6.210.0130.03720.53
5.6.200.0130.07318.25
5.6.190.0030.08320.46
5.6.180.0270.05720.57
5.6.170.0200.04720.50
5.6.160.0130.08320.50
5.6.150.0070.03718.25
5.6.140.0130.07718.14
5.6.130.0000.06718.18
5.6.120.0030.04320.95
5.6.110.0170.07021.03
5.6.100.0030.05720.99
5.6.90.0100.05321.02
5.6.80.0070.08020.37
5.5.350.0230.08320.41
5.5.340.0030.06317.95
5.5.330.0130.07720.44
5.5.320.0300.04720.28
5.5.310.0230.07720.28
5.5.300.0130.07317.95
5.5.290.0030.06017.94
5.5.280.0000.05020.88
5.5.270.0070.08320.80
5.5.260.0170.08020.64
5.5.250.0000.04320.55
5.5.240.0300.07720.29

preferences:
101.63 ms | 400 KiB | 5 Q