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 test(){ return $this->s->stuff; } }; } } $x = new A; $x->test()->test();

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.76
8.3.30.0090.00618.84
8.3.20.0040.00420.29
8.3.10.0000.00920.52
8.3.00.0090.00020.59
8.2.170.0070.00722.96
8.2.160.0100.01022.13
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0070.00021.14
8.2.120.0040.00426.35
8.2.110.0100.00021.04
8.2.100.0000.01317.80
8.2.90.0000.00819.11
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0060.00318.05
8.2.50.0050.00318.09
8.2.40.0070.00020.55
8.2.30.0070.00019.45
8.2.20.0000.00717.74
8.2.10.0040.00418.06
8.2.00.0000.00718.00
8.1.270.0090.00923.88
8.1.260.0080.00028.09
8.1.250.0050.00328.09
8.1.240.0070.00322.42
8.1.230.0070.00417.70
8.1.220.0040.00417.78
8.1.210.0070.00318.77
8.1.200.0030.00617.36
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0000.00818.56
8.1.160.0080.00020.85
8.1.150.0040.00418.88
8.1.140.0060.00319.68
8.1.130.0070.00017.74
8.1.120.0040.00417.37
8.1.110.0080.00017.48
8.1.100.0040.00417.43
8.1.90.0030.00317.39
8.1.80.0000.00817.45
8.1.70.0030.00717.46
8.1.60.0050.00317.54
8.1.50.0030.00617.57
8.1.40.0030.00617.52
8.1.30.0000.00817.66
8.1.20.0000.00817.52
8.1.10.0070.00017.63
8.1.00.0040.00417.49
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.44
8.0.270.0000.00717.26
8.0.260.0030.00317.26
8.0.250.0030.00616.92
8.0.240.0000.00716.98
8.0.230.0000.00717.02
8.0.220.0030.00616.96
8.0.210.0050.00316.89
8.0.200.0000.00617.01
8.0.190.0000.00717.10
8.0.180.0030.00517.02
8.0.170.0040.00416.87
8.0.160.0030.00316.82
8.0.150.0070.00016.89
8.0.140.0070.00316.88
8.0.130.0000.00513.47
8.0.120.0040.00416.98
8.0.110.0040.00416.93
8.0.100.0050.00216.74
8.0.90.0040.00416.93
8.0.80.0080.00716.93
8.0.70.0000.00816.88
8.0.60.0020.00516.77
8.0.50.0050.00316.84
8.0.30.0080.00717.13
8.0.20.0150.00517.40
8.0.10.0080.00016.96
8.0.00.0100.00716.87
7.4.330.0000.00416.66
7.4.320.0000.00616.58
7.4.300.0000.00616.58
7.4.290.0070.00016.43
7.4.280.0000.00716.51
7.4.270.0000.00716.48
7.4.260.0060.00316.59
7.4.250.0060.00316.58
7.4.240.0040.00416.51
7.4.230.0000.00716.52
7.4.220.0090.00916.61
7.4.210.0050.01016.59
7.4.200.0040.00416.51
7.4.160.0140.00316.39
7.4.150.0110.00717.40
7.4.140.0140.00817.86
7.4.130.0100.01116.45
7.4.120.0100.00716.47
7.4.110.0070.01016.54
7.4.100.0160.00716.55
7.4.90.0070.01016.54
7.4.80.0120.00619.39
7.4.70.0100.00716.42
7.4.60.0090.00916.48
7.4.50.0080.00716.59
7.4.40.0090.00916.72
7.4.30.0160.00016.65
7.4.00.0000.01614.69
7.3.330.0000.00513.22
7.3.320.0000.00613.38
7.3.310.0070.00016.39
7.3.300.0080.00016.38
7.3.290.0030.00316.41
7.3.280.0090.00616.32
7.3.270.0110.00717.40
7.3.260.0030.01316.37
7.3.240.0080.00816.57
7.3.230.0060.01516.39
7.3.210.0060.01016.43
7.3.200.0100.00616.38
7.3.190.0060.01016.45
7.3.180.0060.01016.34
7.3.170.0060.01016.48
7.3.160.0130.00316.28
7.3.120.0030.01414.90
7.3.110.0030.01414.69
7.3.100.0070.00714.82
7.3.90.0000.01615.05
7.3.80.0060.00614.76
7.3.70.0070.01114.57
7.3.60.0130.00014.82
7.3.50.0030.00614.75
7.3.40.0150.00314.88
7.3.30.0030.01414.87
7.3.20.0070.01016.83
7.3.10.0000.01516.32
7.3.00.0070.00316.63
7.2.330.0120.00616.61
7.2.320.0120.00616.73
7.2.310.0070.01116.50
7.2.300.0120.00616.77
7.2.290.0170.00316.49
7.2.240.0060.01315.25
7.2.230.0070.01115.11
7.2.220.0070.01115.00
7.2.210.0030.01015.04
7.2.200.0080.00614.84
7.2.190.0120.00315.30
7.2.180.0090.00614.85
7.2.170.0100.00614.74
7.2.160.0130.00014.96
7.2.150.0070.00716.83
7.2.140.0070.00717.13
7.2.130.0000.01417.06
7.2.120.0090.00016.61
7.2.110.0000.01117.13
7.2.100.0090.00016.97
7.2.90.0070.00716.93
7.2.80.0070.00716.91
7.2.70.0030.01216.96
7.2.60.0060.00516.88
7.2.50.0060.00916.92
7.2.40.0000.00916.96
7.2.30.0040.01116.97
7.2.20.0090.00616.62
7.2.10.0040.01116.70
7.2.00.0070.00218.13
7.1.330.0030.01215.77
7.1.320.0090.00615.66
7.1.310.0100.00715.64
7.1.300.0060.00315.68
7.1.290.0030.01015.58
7.1.280.0060.00615.52
7.1.270.0030.00715.85
7.1.260.0040.00415.77
7.1.250.0060.00815.86
7.1.200.0100.00015.87
7.1.100.0050.00518.14
7.1.70.0070.00017.21
7.1.60.0110.01419.27
7.1.50.0040.01816.70
7.1.00.0030.07322.41
7.0.200.0150.00814.99
7.0.60.0070.07721.80
7.0.50.0030.06317.88
7.0.40.0030.05720.16
7.0.30.0130.05020.20
7.0.20.0100.06020.23
7.0.10.0170.07720.23
7.0.00.0070.04020.29
5.6.280.0030.05720.78
5.6.210.0100.03320.63
5.6.200.0000.04318.28
5.6.190.0070.05020.58
5.6.180.0270.03720.46
5.6.170.0200.04020.71
5.6.160.0030.04320.62
5.6.150.0070.07018.23
5.6.140.0070.04318.28
5.6.130.0070.07018.18
5.6.120.0030.09021.14
5.6.110.0100.07321.13
5.6.100.0100.06721.00
5.6.90.0100.03321.01
5.6.80.0130.06020.48
5.5.350.0300.07320.41
5.5.340.0070.06717.98
5.5.330.0130.08720.29
5.5.320.0200.05020.42
5.5.310.0300.07020.50
5.5.300.0070.05718.08
5.5.290.0070.05017.97
5.5.280.0070.08320.74
5.5.270.0070.05720.87
5.5.260.0070.05720.87
5.5.250.0030.04020.62
5.5.240.0030.07720.26

preferences:
53.46 ms | 400 KiB | 5 Q