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; $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.70.0040.01516.88
8.3.60.0120.00918.58
8.3.50.0150.00722.09
8.3.40.0070.00718.79
8.3.30.0100.00318.89
8.3.20.0070.00020.34
8.3.10.0080.00020.61
8.3.00.0040.00420.64
8.2.180.0070.01416.88
8.2.170.0140.00022.96
8.2.160.0150.00022.04
8.2.150.0060.00324.18
8.2.140.0030.00524.66
8.2.130.0040.00420.94
8.2.120.0050.00326.35
8.2.110.0000.01119.00
8.2.100.0080.00417.93
8.2.90.0030.00619.22
8.2.80.0000.00817.97
8.2.70.0080.00017.61
8.2.60.0000.00918.03
8.2.50.0000.00818.09
8.2.40.0050.00320.61
8.2.30.0040.00419.36
8.2.20.0000.00717.69
8.2.10.0000.00717.99
8.2.00.0040.00418.05
8.1.280.0070.00725.92
8.1.270.0080.00023.87
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0100.00024.02
8.1.230.0040.00717.83
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0060.00317.13
8.1.190.0000.00917.13
8.1.180.0040.00418.10
8.1.170.0040.00418.46
8.1.160.0070.00020.77
8.1.150.0000.00718.84
8.1.140.0080.00019.63
8.1.130.0040.00417.70
8.1.120.0040.00417.47
8.1.110.0090.00017.45
8.1.100.0040.00417.51
8.1.90.0000.00717.48
8.1.80.0000.00717.43
8.1.70.0030.00617.35
8.1.60.0090.00017.59
8.1.50.0080.00017.46
8.1.40.0060.00317.57
8.1.30.0060.00317.65
8.1.20.0040.00417.40
8.1.10.0050.00317.59
8.1.00.0040.00417.49
8.0.300.0030.00618.77
8.0.290.0040.00416.75
8.0.280.0000.00718.50
8.0.270.0070.00017.28
8.0.260.0000.00817.32
8.0.250.0090.00016.93
8.0.240.0040.00416.95
8.0.230.0000.00716.93
8.0.220.0030.00616.96
8.0.210.0000.00716.89
8.0.200.0030.00316.91
8.0.190.0050.00316.96
8.0.180.0040.00416.89
8.0.170.0000.00716.91
8.0.160.0000.00817.03
8.0.150.0040.00416.96
8.0.140.0000.00716.80
8.0.130.0000.00513.37
8.0.120.0070.00016.83
8.0.110.0000.00816.94
8.0.100.0040.00416.96
8.0.90.0000.00716.95
8.0.80.0030.01216.91
8.0.70.0050.00217.00
8.0.60.0080.00016.85
8.0.50.0050.00216.85
8.0.30.0110.00517.32
8.0.20.0100.00917.40
8.0.10.0070.00017.01
8.0.00.0120.00616.75
7.4.330.0050.00016.79
7.4.320.0050.00316.60
7.4.300.0060.00016.62
7.4.290.0000.00716.43
7.4.280.0050.00316.63
7.4.270.0000.00716.52
7.4.260.0030.00616.51
7.4.250.0000.00916.57
7.4.240.0030.00516.51
7.4.230.0070.00016.70
7.4.220.0070.01016.38
7.4.210.0070.00716.63
7.4.200.0000.00816.26
7.4.160.0000.01616.59
7.4.150.0120.00617.40
7.4.140.0090.00917.86
7.4.130.0140.01316.43
7.4.120.0110.00616.42
7.4.110.0140.00316.48
7.4.100.0090.01216.61
7.4.90.0100.01016.33
7.4.80.0040.01319.39
7.4.70.0100.00616.61
7.4.60.0080.00816.47
7.4.50.0000.01116.20
7.4.40.0100.00616.48
7.4.30.0140.00716.51
7.4.00.0040.01014.78
7.3.330.0060.00013.29
7.3.320.0050.00013.16
7.3.310.0000.00816.29
7.3.300.0030.00316.16
7.3.290.0040.00416.29
7.3.280.0080.00716.27
7.3.270.0070.01617.40
7.3.260.0070.01016.30
7.3.240.0140.00716.42
7.3.230.0120.00616.39
7.3.210.0110.00616.25
7.3.200.0090.00816.32
7.3.190.0060.01216.33
7.3.180.0130.00316.22
7.3.170.0100.00716.50
7.3.160.0100.00616.50
7.3.120.0060.01215.02
7.3.110.0030.01015.02
7.3.100.0100.00614.98
7.3.90.0040.01114.72
7.3.80.0100.00714.74
7.3.70.0030.00614.54
7.3.60.0120.00414.80
7.3.50.0120.00614.70
7.3.40.0030.01214.78
7.3.30.0000.01514.93
7.3.20.0030.01016.52
7.3.10.0070.00716.43
7.3.00.0100.00716.75
7.2.330.0170.00316.66
7.2.320.0090.01916.63
7.2.310.0070.01116.44
7.2.300.0000.01816.47
7.2.290.0060.01216.70
7.2.250.0070.01114.84
7.2.240.0070.01314.94
7.2.230.0030.01414.86
7.2.220.0000.01115.29
7.2.210.0040.01114.77
7.2.200.0110.00415.15
7.2.190.0070.01114.74
7.2.180.0110.00714.94
7.2.170.0100.00714.92
7.2.110.0310.00916.55
7.2.60.0030.01016.83
7.2.00.0000.01119.54
7.1.330.0110.00615.67
7.1.320.0040.00815.73
7.1.310.0000.01315.75
7.1.300.0110.00715.66
7.1.290.0100.00315.57
7.1.280.0060.00615.75
7.1.270.0070.00715.57
7.1.260.0030.01315.48
7.1.200.0030.00715.86
7.1.100.0030.01018.09
7.1.70.0050.00217.07
7.1.60.0120.01219.27
7.1.50.0110.01116.88
7.1.00.0030.07722.44
7.0.200.0160.00914.98
7.0.60.0030.07721.87
7.0.50.0070.07717.91
7.0.40.0070.07720.25
7.0.30.0300.06020.08
7.0.20.0200.04320.06
7.0.10.0070.05320.21
7.0.00.0100.06320.08
5.6.210.0000.04320.63
5.6.200.0030.04718.19
5.6.190.0100.08020.34
5.6.180.0230.06320.61
5.6.170.0170.04320.62
5.6.160.0070.04020.48
5.6.150.0070.08018.12
5.6.140.0170.07018.11
5.6.130.0130.06718.14
5.6.120.0100.08021.00
5.6.110.0200.07021.04
5.6.100.0030.04020.89
5.6.90.0000.04321.00
5.6.80.0200.07320.49
5.5.350.0300.06720.53
5.5.340.0030.04717.98
5.5.330.0130.07320.13
5.5.320.0200.06320.33
5.5.310.0170.06020.32
5.5.300.0100.06317.97
5.5.290.0030.04717.97
5.5.280.0070.05720.85
5.5.270.0170.07320.72
5.5.260.0100.08320.76
5.5.250.0030.04020.61
5.5.240.0030.07320.16

preferences:
67.36 ms | 401 KiB | 5 Q