3v4l.org

run code in 500+ PHP versions simultaneously
<?php class a { function foo() { echo __METHOD__ . PHP_EOL; } } class b extends a {} class c extends b { function bar() { $this::foo(); $this->foo(); a::foo(); b::foo(); c::foo(); d::foo(); static::foo(); self::foo(); parent::foo(); } } class d extends c {} (new c)->bar();

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.5.80.0040.00417.16
8.5.70.0100.00717.09
8.5.60.0120.00617.13
8.5.50.0110.00617.00
8.5.30.0080.01018.05
8.5.20.0060.01120.21
8.5.10.0090.00916.89
8.5.00.0140.00719.93
8.4.230.0090.00522.17
8.4.220.0060.00319.65
8.4.210.0110.01021.66
8.4.180.0140.00919.86
8.4.170.0130.01023.84
8.4.160.0090.01223.85
8.4.150.0050.00716.81
8.4.140.0130.01118.02
8.4.130.0110.00818.00
8.4.120.0090.01020.88
8.4.110.0130.00818.71
8.4.100.0070.00617.87
8.4.90.0140.00617.83
8.4.80.0220.00819.61
8.4.70.0180.00718.13
8.4.60.0220.00618.01
8.4.50.0200.00317.75
8.4.40.0350.00417.51
8.4.30.0220.00317.71
8.4.20.0170.00717.84
8.4.10.0240.00617.61
8.3.320.0120.00818.36
8.3.310.0100.00918.51
8.3.300.0130.00620.80
8.3.290.0080.01220.76
8.3.280.0130.00718.50
8.3.270.0110.00916.57
8.3.260.0110.00916.61
8.3.250.0110.00818.78
8.3.240.0080.01216.64
8.3.230.0080.01116.79
8.3.220.0090.00316.97
8.3.210.0190.00316.97
8.3.200.0290.00216.97
8.3.190.0190.00216.97
8.3.180.0330.01016.97
8.3.170.0370.00916.97
8.3.160.0260.00616.97
8.3.150.0280.00716.97
8.3.140.0200.00416.97
8.3.130.0300.00816.97
8.3.120.0310.00516.97
8.3.110.0320.00416.97
8.3.100.0450.00716.97
8.3.90.0390.01316.97
8.3.80.0430.00916.97
8.3.70.0410.01016.97
8.3.60.0400.01016.97
8.3.50.0290.00616.97
8.3.40.0250.00717.80
8.3.30.0360.00817.45
8.3.20.0370.01017.50
8.3.10.0410.00317.37
8.3.00.0260.00517.57
8.2.320.0120.00817.87
8.2.310.0120.00818.12
8.2.300.0110.00820.35
8.2.290.0090.01019.04
8.2.280.0280.00816.97
8.2.270.0340.00716.97
8.2.260.0260.00516.97
8.2.250.0210.00616.97
8.2.240.0320.01016.97
8.2.230.0360.00716.97
8.2.220.0310.00816.97
8.2.210.0360.00616.97
8.2.200.0350.00616.97
8.2.190.0330.00616.97
8.2.180.0330.01016.97
8.2.170.0330.00917.84
8.2.160.0400.00917.72
8.2.150.0330.00517.54
8.2.140.0270.00417.54
8.2.130.0360.00517.53
8.2.120.0430.00617.37
8.2.110.0210.00617.63
8.2.100.0200.00817.54
8.2.90.0370.00817.45
8.2.80.0360.00817.57
8.2.70.0340.01017.41
8.2.60.0370.00717.50
8.2.50.0370.00717.48
8.2.40.0360.00417.57
8.2.30.0380.00517.30
8.2.20.0350.00517.43
8.2.10.0310.00917.59
8.2.00.0370.00717.36
8.1.340.0140.00621.73

preferences:
58.36 ms | 901 KiB | 5 Q