3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyParent { private $var = 0; } class Child extends MyParent { public function __construct() { $this->var = 1; } } class Abuser extends MyParent { public function get(MyParent $child) { return $child->var; } } $chils = new Child(); $abuser = new Abuser(); var_dump($abuser->get($child));

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.0070.00716.75
8.3.50.0070.01422.17
8.3.40.0070.00718.80
8.3.30.0140.00019.04
8.3.20.0070.00020.22
8.3.10.0000.00821.61
8.3.00.0110.00020.96
8.2.180.0170.00318.41
8.2.170.0140.00022.96
8.2.160.0070.00722.30
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00419.89
8.2.110.0070.00319.10
8.2.100.0110.00017.63
8.2.90.0000.00819.02
8.2.80.0030.00617.97
8.2.70.0050.00317.50
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0000.00818.07
8.2.30.0000.00718.04
8.2.20.0040.00417.74
8.2.10.0040.00417.89
8.2.00.0040.00417.68
8.1.280.0060.01225.92
8.1.270.0130.00720.46
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0090.00023.97
8.1.230.0080.00418.76
8.1.220.0080.00017.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0030.00517.22
8.1.180.0000.00718.10
8.1.170.0040.00718.54
8.1.160.0000.00822.01
8.1.150.0080.00018.80
8.1.140.0000.00717.44
8.1.130.0070.00017.79
8.1.120.0040.00417.30
8.1.110.0040.00417.45
8.1.100.0040.00417.40
8.1.90.0000.00717.42
8.1.80.0000.00717.39
8.1.70.0000.00717.30
8.1.60.0040.00417.60
8.1.50.0000.00917.59
8.1.40.0000.00817.53
8.1.30.0040.00417.55
8.1.20.0040.00417.52
8.1.10.0000.00717.49
8.1.00.0060.00617.44
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0070.00017.21
8.0.260.0030.00317.16
8.0.250.0070.00016.86
8.0.240.0040.00416.86
8.0.230.0040.00416.92
8.0.220.0000.00716.93
8.0.210.0050.00216.86
8.0.200.0000.00716.88
8.0.190.0000.00716.93
8.0.180.0000.00816.94
8.0.170.0040.00416.95
8.0.160.0030.00316.88
8.0.150.0070.00016.75
8.0.140.0000.00716.86
8.0.130.0000.00513.33
8.0.120.0050.00216.82
8.0.110.0070.00016.81
8.0.100.0060.00316.94
8.0.90.0040.00416.88
8.0.80.0060.01616.96
8.0.70.0080.00016.85
8.0.60.0040.00416.83
8.0.50.0040.00416.96
8.0.30.0140.00717.14
8.0.20.0090.01017.40
8.0.10.0000.00717.06
8.0.00.0090.00817.01
7.4.330.0050.00015.03
7.4.320.0000.00616.37
7.4.300.0000.00616.43
7.4.290.0040.00416.61
7.4.280.0070.00316.50
7.4.270.0000.00716.37
7.4.260.0070.00016.57
7.4.250.0000.00716.53
7.4.240.0020.00616.59
7.4.230.0030.00316.41
7.4.220.0090.00916.56
7.4.210.0100.00316.63
7.4.200.0000.00716.63
7.4.160.0070.00716.51
7.4.150.0110.00717.40
7.4.140.0130.00517.86
7.4.130.0080.01016.60
7.4.120.0100.00816.71
7.4.110.0120.00616.41
7.4.100.0110.00616.54
7.4.90.0060.01216.41
7.4.80.0060.01219.39
7.4.70.0150.00316.63
7.4.60.0080.00916.64
7.4.50.0000.00816.67
7.4.40.0070.01016.60
7.4.30.0040.01416.55
7.4.00.0090.00614.93
7.3.330.0000.00513.32
7.3.320.0020.00213.43
7.3.310.0070.00016.35
7.3.300.0030.00316.32
7.3.290.0070.00716.34
7.3.280.0070.01116.41
7.3.270.0070.01017.40
7.3.260.0090.00916.62
7.3.250.0120.00516.53
7.3.240.0100.00616.37
7.3.230.0090.01616.43
7.3.210.0070.01116.49
7.3.200.0140.00319.39
7.3.190.0070.01416.57
7.3.180.0060.00916.49
7.3.170.0000.01716.39
7.3.160.0030.01316.29
7.2.330.0150.00316.68
7.2.320.0040.01516.61
7.2.310.0070.01516.69
7.2.300.0060.01016.67
7.2.290.0140.00316.69
7.2.60.0130.00016.77
7.1.200.0090.00015.72
7.1.70.0000.00817.12
7.1.60.0120.00819.46
7.1.50.0070.01716.95
7.1.00.0070.07322.31
7.0.200.0080.00614.94
7.0.140.0070.07022.21
7.0.60.0100.07719.86
7.0.50.0200.02717.85
7.0.40.0100.06320.02
7.0.30.0200.05320.07
7.0.20.0270.04320.08
7.0.10.0070.08720.23
7.0.00.0030.08720.10
5.6.280.0000.07720.79
5.6.210.0100.07320.44
5.6.200.0100.07718.15
5.6.190.0030.07720.64
5.6.180.0470.06320.49
5.6.170.0270.04020.54
5.6.160.0130.07720.71
5.6.150.0030.08018.27
5.6.140.0100.08018.12
5.6.130.0070.08318.14
5.6.120.0100.04320.88
5.6.110.0100.08021.02
5.6.100.0100.06021.01
5.6.90.0070.05321.16
5.6.80.0070.04020.39
5.5.350.0330.07020.53
5.5.340.0070.08017.95
5.5.330.0130.06320.41
5.5.320.0000.08720.32
5.5.310.0370.07320.37
5.5.300.0030.05717.95
5.5.290.0070.06717.95
5.5.280.0000.06020.88
5.5.270.0070.08720.89
5.5.260.0030.04720.84
5.5.250.0100.05720.62
5.5.240.0070.08320.29
5.4.450.0200.05319.41
5.4.440.0870.06719.16
5.4.430.1000.05319.44
5.4.420.0600.04719.19
5.4.410.1100.05719.57
5.4.400.0370.04718.62
5.4.390.0270.06718.59
5.4.380.0330.05318.52
5.4.370.0270.05718.61
5.4.360.0330.05018.73
5.4.350.0330.05018.80
5.4.340.0230.05318.74
5.4.320.0430.06318.79
5.4.310.0300.05318.78
5.4.300.0230.05018.71
5.4.290.0300.04718.63
5.4.280.0200.05718.57
5.4.270.0270.05318.84
5.4.260.0230.06018.62
5.4.250.0300.05318.52
5.4.240.0300.05018.72
5.4.230.0130.06318.57
5.4.220.0230.05718.51
5.4.210.0230.05318.69
5.4.200.0330.04716.69
5.4.190.0330.04318.59
5.4.180.0300.05018.48
5.4.170.0270.05318.46
5.4.160.0200.05718.48
5.4.150.0270.05318.48
5.4.140.0270.05716.27
5.4.130.0300.04316.27
5.4.120.0270.04716.29
5.4.110.0200.05316.30
5.4.100.0300.05716.27
5.4.90.0230.05716.45
5.4.80.0370.04016.32
5.4.70.0270.05316.20
5.4.60.0230.05316.30
5.4.50.0170.05716.19
5.4.40.0270.05716.13
5.4.30.0430.03716.16
5.4.20.0270.05016.26
5.4.10.0230.05016.14
5.4.00.0200.05715.77
5.3.290.0270.05714.78
5.3.280.0070.07314.70
5.3.270.0230.06314.63
5.3.260.0330.05314.64
5.3.250.0230.06014.83
5.3.240.0270.05314.64
5.3.230.0330.04314.65
5.3.220.0230.05314.56
5.3.210.0270.06014.59
5.3.200.0330.04014.57
5.3.190.0170.05714.70
5.3.180.0200.05014.61
5.3.170.0270.04714.79
5.3.160.0400.03714.58
5.3.150.0270.05314.74
5.3.140.0270.05314.77
5.3.130.0270.05714.59
5.3.120.0230.06014.60
5.3.110.0230.06314.57
5.3.100.0230.05014.18
5.3.90.0230.05314.16
5.3.80.0270.05014.07
5.3.70.0200.05714.12
5.3.60.0270.05314.00
5.3.50.0230.05014.08
5.3.40.0200.05314.16
5.3.30.0200.05014.04
5.3.20.0230.04713.92
5.3.10.0330.04313.87
5.3.00.0270.04313.64
5.2.170.0130.05011.17
5.2.160.0230.03711.20
5.2.150.0230.03711.27
5.2.140.0170.04711.22
5.2.130.0170.04311.13
5.2.120.0130.04711.20
5.2.110.0200.04011.18
5.2.100.0100.04711.22
5.2.90.0230.03311.32
5.2.80.0230.03711.17
5.2.70.0300.04311.20
5.2.60.0130.04711.16
5.2.50.0170.04011.05
5.2.40.0100.04311.12
5.2.30.0230.04010.99
5.2.20.0230.03311.16
5.2.10.0130.04311.07
5.2.00.0170.04310.76
5.1.60.0170.03310.04
5.1.50.0130.03710.04
5.1.40.0170.03010.00
5.1.30.0230.02710.38
5.1.20.0170.03710.46
5.1.10.0200.03310.28
5.1.00.0170.03310.10
5.0.50.0070.0338.73
5.0.40.0100.0278.43
5.0.30.0100.0438.36
5.0.20.0100.0238.28
5.0.10.0130.0278.23
5.0.00.0170.0438.20
4.4.90.0100.0206.70
4.4.80.0100.0206.70
4.4.70.0030.0306.70
4.4.60.0070.0236.70
4.4.50.0030.0276.70
4.4.40.0070.0376.70
4.4.30.0070.0206.70
4.4.20.0070.0236.70
4.4.10.0100.0236.70
4.4.00.0070.0376.70
4.3.110.0170.0136.70
4.3.100.0100.0206.70
4.3.90.0130.0176.70
4.3.80.0100.0336.70
4.3.70.0030.0236.70
4.3.60.0100.0236.70
4.3.50.0070.0236.70
4.3.40.0070.0336.70
4.3.30.0030.0236.70
4.3.20.0030.0236.70
4.3.10.0070.0276.70
4.3.00.0430.02714.40

preferences:
51.23 ms | 401 KiB | 5 Q