3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); class A { protected $x; public function __construct( $x ) { $this->x = $x; } protected function f() { return $this->x; } public function m() { return A::f(); } } class B extends A { protected function f() { return 2 * $this->x; } } $a = new A(1); echo 'A: ' . $a->m() . PHP_EOL; $b = new B(1); echo 'B: ' . $b->m();

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.30.0040.00419.48
8.5.20.0130.00419.46
8.5.10.0080.01016.65
8.5.00.0140.00820.13
8.4.180.0060.00422.02
8.4.170.0160.00621.86
8.4.160.0110.00622.10
8.4.150.0080.00416.82
8.4.140.0130.00917.38
8.4.130.0070.00518.64
8.4.120.0070.00823.90
8.4.110.0100.01022.67
8.4.100.0130.00817.57
8.4.90.0110.01020.48
8.4.80.0110.00920.50
8.4.70.0060.00220.67
8.4.60.0100.00918.61
8.4.50.0110.00918.90
8.4.40.0080.00817.69
8.4.30.0180.00317.41
8.4.20.0070.01019.77
8.4.10.0030.00619.42
8.3.300.0120.01018.35
8.3.290.0120.00820.89
8.3.280.0080.01218.26
8.3.270.0130.00916.84
8.3.260.0130.00716.54
8.3.250.0120.00818.95
8.3.240.0060.00416.79
8.3.230.0050.00516.68
8.3.220.0090.00918.83
8.3.210.0120.01016.62
8.3.200.0050.00416.63
8.3.190.0050.00417.14
8.3.180.0040.00616.77
8.3.170.0080.00618.43
8.3.160.0060.01217.30
8.3.150.0060.01217.13
8.3.140.0000.00817.13
8.3.130.0000.00816.71
8.3.120.0130.00318.82
8.3.110.0040.01220.94
8.3.100.0120.00616.73
8.3.90.0220.00722.66
8.3.80.0230.00622.37
8.3.70.0240.00722.47
8.3.60.0240.00922.66
8.3.50.0190.00821.01
8.3.40.0240.00422.73
8.3.30.0160.01122.73
8.3.20.0210.00422.96
8.3.10.0200.00525.21
8.3.00.0190.00625.12
8.2.300.0120.00820.41
8.2.290.0130.00616.71
8.2.280.0090.01018.24
8.2.270.0040.01117.16
8.2.260.0060.00320.59
8.2.250.0090.00018.73
8.2.240.0000.00817.07
8.2.230.0040.00422.58
8.2.220.0000.00924.06
8.2.210.0170.00426.77
8.2.200.0140.01021.63
8.2.190.0220.00721.67
8.2.180.0260.00722.53
8.2.170.0300.00422.83
8.2.160.0160.01024.87
8.2.150.0100.00325.47
8.2.140.0110.00325.71
8.2.130.0130.00123.49
8.2.120.0160.00826.56
8.2.110.0210.00324.53
8.2.100.0210.00222.27
8.2.90.0140.00523.14
8.2.80.0150.01122.40
8.2.70.0070.00722.35
8.2.60.0110.00422.35
8.2.50.0090.00722.43
8.2.40.0100.00323.07
8.2.30.0120.00223.74
8.2.20.0190.00522.39
8.2.10.0170.00622.35
8.2.00.0170.00623.09
8.1.340.0120.00920.28
8.1.330.0050.00322.13
8.1.320.0130.00616.10
8.1.310.0040.00416.87
8.1.300.0060.00316.03
8.1.290.0190.00622.82
8.1.280.0180.01026.34
8.1.270.0170.00625.27
8.1.260.0180.00426.56
8.1.250.0220.00327.43
8.1.240.0170.00722.99
8.1.230.0230.00223.90
8.1.220.0190.00822.25
8.1.210.0150.01022.88
8.1.200.0190.00622.00
8.1.190.0140.00922.00
8.1.180.0220.00122.43
8.1.170.0180.00622.78
8.1.160.0180.00522.82
8.1.150.0140.00822.83
8.1.140.0150.00522.86
8.1.130.0140.00522.89
8.1.120.0130.00622.07
8.1.110.0120.00722.09
8.1.100.0090.00422.12
8.1.90.0130.00022.10
8.1.80.0090.00422.13
8.1.70.0170.00422.13
8.1.60.0180.00722.16
8.1.50.0190.00622.09
8.1.40.0180.00622.14
8.1.30.0180.00522.19
8.1.20.0110.00922.17
8.1.10.0180.00622.13
8.1.00.0120.01022.14
8.0.300.0180.00323.20
8.0.290.0140.00821.70
8.0.280.0170.00622.54
8.0.270.0170.00521.75
8.0.260.0170.00522.02
8.0.250.0150.00721.81
8.0.240.0170.00721.88
8.0.230.0160.00521.80
8.0.220.0210.00221.83
8.0.210.0150.00721.82
8.0.200.0100.01321.84
8.0.190.0180.00421.86
8.0.180.0170.00521.85
8.0.170.0140.00921.85
8.0.160.0160.00621.83
8.0.150.0180.00421.79
8.0.140.0130.00821.79
8.0.130.0200.00220.04
8.0.120.0170.00521.83
8.0.110.0180.00421.79
8.0.100.0140.00621.89
8.0.90.0190.00621.77
8.0.80.0130.00720.15
8.0.70.0150.00721.77
8.0.60.0170.00521.73
8.0.50.0110.01121.79
8.0.30.0140.00718.65
8.0.20.0160.01120.52
8.0.10.0190.00321.86
8.0.00.0150.01119.15
7.4.330.0130.00721.16
7.4.320.0160.00621.58
7.4.300.0190.00121.62
7.4.290.0130.00921.69
7.4.280.0160.00521.58
7.4.270.0170.00821.71
7.4.260.0170.00521.66
7.4.250.0200.00321.62
7.4.240.0130.00721.60
7.4.230.0140.00521.59
7.4.220.0110.00621.70
7.4.210.0140.00519.99
7.4.200.0170.00321.68
7.4.190.0310.00326.77
7.4.180.0230.01026.77
7.4.160.0140.00719.11
7.4.150.0300.00526.77
7.4.140.0150.00819.64
7.4.130.0150.00919.81
7.4.120.0130.00717.93
7.4.110.0120.01019.96
7.4.100.0160.00819.77
7.4.90.0160.00720.00
7.4.80.0120.01120.83
7.4.70.0130.01019.82
7.4.60.0150.00919.90
7.4.50.0140.00619.90
7.4.40.0140.00819.95
7.4.30.0160.01121.59
7.4.20.0190.00721.65
7.4.10.0130.00819.45
7.4.00.0130.00618.32
7.3.330.0190.00019.92
7.3.320.0160.00519.92
7.3.310.0100.01021.48
7.3.300.0100.01021.46
7.3.290.0140.00621.44
7.3.280.0120.01019.78
7.3.270.0370.00326.77
7.3.260.0140.00918.38
7.3.250.0180.00821.65
7.3.240.0150.00918.08
7.3.230.0130.00919.76
7.3.220.0190.00821.57
7.3.210.0140.00919.77
7.3.200.0140.00919.71
7.3.190.0120.01019.84
7.3.180.0140.00819.76
7.3.170.0150.00919.79
7.3.160.0190.00319.86
7.3.150.0180.00721.53
7.3.140.0180.00821.49
7.3.130.0170.00719.29
7.3.120.0180.00719.33
7.3.110.0130.00919.34
7.3.100.0110.00519.21
7.3.90.0050.01119.16
7.3.80.0160.00719.40
7.3.70.0150.00719.36
7.3.60.0150.00819.18
7.3.50.0150.00619.24
7.3.40.0110.00919.24
7.3.30.0150.00619.25
7.3.20.0200.00419.90
7.3.10.0170.00519.84
7.3.00.0200.00619.83
7.2.340.0220.00621.44
7.2.330.0180.00820.03
7.2.320.0160.01019.98
7.2.310.0150.00920.08
7.2.300.0190.01019.94
7.2.290.0150.01319.96
7.2.280.0220.00921.59
7.2.270.0220.00721.47
7.2.260.0150.01019.21
7.2.250.0180.00919.38
7.2.240.0200.00619.48
7.2.230.0180.00819.41
7.2.220.0150.01019.26
7.2.210.0190.00519.46
7.2.200.0140.00619.38
7.2.190.0210.00719.45
7.2.180.0200.00519.46
7.2.170.0190.00519.46
7.2.160.0160.00819.39
7.2.150.0150.01320.18
7.2.140.0180.00720.13
7.2.130.0190.00420.04
7.2.120.0180.00920.15
7.2.110.0170.00720.06
7.2.100.0190.00820.11
7.2.90.0320.00920.06
7.2.80.0230.00718.69
7.2.70.0220.00918.88
7.2.60.0250.00918.70
7.2.50.0270.00818.79
7.2.40.0220.00918.71
7.2.30.0220.00718.88
7.2.20.0220.00718.78
7.2.10.0260.00418.85
7.2.00.0230.01018.82
7.1.330.0140.01119.33
7.1.320.0120.01019.31
7.1.310.0130.01019.22
7.1.300.0150.00719.27
7.1.290.0240.01319.28
7.1.280.0170.00719.30
7.1.270.0160.00619.36
7.1.260.0090.01319.29
7.1.250.0200.00519.34
7.1.240.0160.00419.32
7.1.230.0220.01119.35
7.1.220.0150.00519.29
7.1.210.0200.00619.33
7.1.200.0150.00618.41
7.1.190.0200.00518.04
7.1.180.0240.00618.02
7.1.170.0910.00418.02
7.1.160.0230.00617.95
7.1.150.0220.00618.01
7.1.140.0230.00617.96
7.1.130.0260.00517.92
7.1.120.0190.00817.81
7.1.110.0220.00717.84
7.1.100.0210.00618.01
7.1.90.0210.00817.98
7.1.80.0210.01117.95
7.1.70.0240.00417.90
7.1.60.0240.00622.40
7.1.50.0260.00922.36
7.1.40.0330.00722.45
7.1.30.0270.00922.31
7.1.20.0290.00622.36
7.1.10.0280.00417.93
7.1.00.0160.01117.92
7.0.330.0180.00519.14
7.0.320.0160.00719.18
7.0.310.0130.01019.08
7.0.300.0180.00619.02
7.0.290.0150.00719.23
7.0.280.0190.00519.09
7.0.270.0180.00519.13
7.0.260.0140.00819.14
7.0.250.0200.00819.16
7.0.240.0180.00519.16
7.0.230.0190.00719.15
7.0.220.0170.00719.09
7.0.210.0160.00919.18
7.0.200.0170.00619.05
7.0.190.0110.01219.13
7.0.180.0150.00719.08
7.0.170.0140.00919.25
7.0.160.0150.00719.20
7.0.150.0160.00819.14
7.0.140.0150.00919.04
7.0.130.0150.01019.13
7.0.120.0140.00919.14
7.0.110.0140.01019.13
7.0.100.0180.00619.16
7.0.90.0160.00719.16
7.0.80.0180.00819.05
7.0.70.0150.00919.17
7.0.60.0160.00819.15
7.0.50.0170.00519.12
7.0.40.0210.00618.46
7.0.30.0240.00418.41
7.0.20.0140.00918.49
7.0.10.0130.01018.51
7.0.00.0180.00618.43
5.6.400.0170.00918.92
5.6.390.0160.00818.97
5.6.380.0170.00818.95
5.6.370.0130.00918.88
5.6.360.0170.00719.13
5.6.350.0180.00819.01
5.6.340.0230.00619.14
5.6.330.0190.00519.05
5.6.320.0170.00718.93
5.6.310.0180.00719.09
5.6.300.0180.00618.97
5.6.290.0170.00818.90
5.6.280.0170.00718.92
5.6.270.0140.01219.04
5.6.260.0140.01019.13
5.6.250.0180.00519.02
5.6.240.0150.01119.03
5.6.230.0160.01019.05
5.6.220.0200.00518.89
5.6.210.0160.00919.00
5.6.200.0160.00619.08
5.6.190.0160.00719.13
5.6.180.0160.01118.98
5.6.170.0230.00518.94
5.6.160.0200.00718.91
5.6.150.0170.00818.94
5.6.140.0150.00819.09
5.6.130.0140.01019.04
5.6.120.0150.01119.11
5.6.110.0140.01019.03
5.6.100.0120.01319.07
5.6.90.0190.00519.04
5.6.80.0200.00619.00
5.6.70.0180.00719.01
5.6.60.0170.00918.90
5.6.50.0160.00918.90
5.6.40.0150.00718.94
5.6.30.0200.00418.95
5.6.20.0180.00618.94
5.6.10.0170.00818.90
5.6.00.0170.00918.98

preferences:
48.41 ms | 1984 KiB | 5 Q