3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyParent { private $var1 = 0; } class Child extends MyParent { public function __construct() { $this->var1 = 1; } } class Abuser extends MyParent { public function get(MyParent $child) { return $child->var1; } } $child = 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.70.0170.00016.63
8.3.60.0040.01218.41
8.3.50.0110.00822.05
8.3.40.0120.00318.79
8.3.30.0100.00319.04
8.3.20.0030.00520.20
8.3.10.0060.00321.94
8.3.00.0000.00820.89
8.2.180.0090.00618.13
8.2.170.0110.00422.96
8.2.160.0030.01022.26
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0030.00619.67
8.2.110.0060.00319.33
8.2.100.0080.00417.63
8.2.90.0000.00819.22
8.2.80.0050.00517.97
8.2.70.0050.00317.50
8.2.60.0000.00817.91
8.2.50.0000.00818.10
8.2.40.0050.00320.45
8.2.30.0000.00818.07
8.2.20.0040.00417.54
8.2.10.0000.00717.88
8.2.00.0000.00917.53
8.1.280.0150.00625.92
8.1.270.0100.00018.76
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.01419.18
8.1.230.0060.00617.52
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0110.00017.23
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0040.00718.59
8.1.160.0000.00821.89
8.1.150.0040.00418.84
8.1.140.0040.00417.40
8.1.130.0000.00717.82
8.1.120.0070.00017.30
8.1.110.0030.00517.43
8.1.100.0000.00717.36
8.1.90.0030.00317.34
8.1.80.0000.00717.23
8.1.70.0000.00717.30
8.1.60.0060.00317.60
8.1.50.0000.00917.53
8.1.40.0040.00417.57
8.1.30.0040.00417.68
8.1.20.0040.00417.49
8.1.10.0000.00817.35
8.1.00.0080.00417.42
8.0.300.0000.00718.77
8.0.290.0000.00716.63
8.0.280.0000.00718.42
8.0.270.0070.00017.08
8.0.260.0030.00318.43
8.0.250.0030.00317.02
8.0.240.0070.00016.86
8.0.230.0080.00416.91
8.0.220.0070.00016.88
8.0.210.0070.00016.91
8.0.200.0040.00416.96
8.0.190.0000.00716.85
8.0.180.0040.00416.95
8.0.170.0080.00016.98
8.0.160.0050.00316.76
8.0.150.0000.00716.83
8.0.140.0050.00316.75
8.0.130.0000.00713.29
8.0.120.0040.00416.95
8.0.110.0040.00416.80
8.0.100.0090.00016.78
8.0.90.0000.00716.85
8.0.80.0110.01116.82
8.0.70.0040.00417.02
8.0.60.0000.00816.77
8.0.50.0040.00416.82
8.0.30.0100.01116.80
8.0.20.0070.01117.40
8.0.10.0050.00316.96
8.0.00.0060.01116.89
7.4.330.0000.00515.14
7.4.320.0070.00016.55
7.4.300.0000.00616.58
7.4.290.0060.00316.60
7.4.280.0060.00316.50
7.4.270.0040.00416.53
7.4.260.0030.00316.57
7.4.250.0000.00816.57
7.4.240.0070.00216.58
7.4.230.0070.00016.62
7.4.220.0150.00916.65
7.4.210.0100.01016.63
7.4.200.0070.00016.31
7.4.160.0160.00316.46
7.4.150.0120.00617.40
7.4.140.0160.00617.86
7.4.130.0050.01116.53
7.4.120.0110.00616.49
7.4.110.0090.00916.58
7.4.100.0090.01216.49
7.4.90.0090.00916.48
7.4.80.0070.01019.39
7.4.70.0100.00716.54
7.4.60.0150.00016.41
7.4.50.0060.00316.29
7.4.40.0120.00416.31
7.4.30.0180.00016.35
7.4.00.0030.01314.53
7.3.330.0030.00313.28
7.3.320.0030.00313.26
7.3.310.0070.00016.38
7.3.300.0040.00416.18
7.3.290.0070.00716.29
7.3.280.0070.00916.29
7.3.270.0070.01717.40
7.3.260.0080.00816.29
7.3.250.0140.00416.45
7.3.240.0120.00416.57
7.3.230.0090.00916.39
7.3.210.0120.00416.34
7.3.200.0130.00719.39
7.3.190.0120.00316.23
7.3.180.0090.00616.34
7.3.170.0130.00916.27
7.3.160.0080.01216.59
7.3.10.0100.00316.87
7.3.00.0000.01316.74
7.2.330.0090.00916.53
7.2.320.0130.01016.50
7.2.310.0150.01216.70
7.2.300.0030.01316.44
7.2.290.0100.00716.64
7.2.130.0090.00617.09
7.2.120.0030.01016.59
7.2.110.0070.00716.89
7.2.100.0090.00916.85
7.2.90.0120.00317.08
7.2.80.0060.00916.72
7.2.70.0060.00616.98
7.2.60.0100.00616.88
7.2.50.0080.00416.88
7.2.40.0070.00716.67
7.2.30.0090.00616.70
7.2.20.0070.00716.70
7.2.10.0040.00816.63
7.2.00.0070.00818.06
7.1.250.0060.00615.52
7.1.100.0000.01218.06
7.1.70.0040.00417.05
7.1.60.0070.01719.46
7.1.50.0200.00034.77
7.1.00.0000.07322.28
7.0.200.0040.00414.82
7.0.140.0100.07022.11
7.0.60.0170.07320.05
7.0.50.0100.07717.74
7.0.40.0130.05720.20
7.0.30.0270.04720.35
7.0.20.0230.07320.23
7.0.10.0070.04020.10
7.0.00.0030.09020.16
5.6.280.0030.07321.13
5.6.210.0200.07020.51
5.6.200.0170.04018.25
5.6.190.0130.08020.39
5.6.180.0170.04020.68
5.6.170.0130.04720.44
5.6.160.0100.08320.44
5.6.150.0030.04318.18
5.6.140.0100.07718.14
5.6.130.0000.07718.14
5.6.120.0070.08721.05
5.6.110.0130.08021.03
5.6.100.0030.05021.00
5.6.90.0070.07321.00
5.6.80.0130.06720.39
5.5.350.0230.07020.45
5.5.340.0030.08717.97
5.5.330.0070.08320.27
5.5.320.0200.07320.42
5.5.310.0200.08320.23
5.5.300.0170.07017.92
5.5.290.0070.04018.09
5.5.280.0070.05320.85
5.5.270.0130.04720.83
5.5.260.0200.06020.87
5.5.250.0070.07720.59
5.5.240.0030.03320.26
5.4.450.0700.08319.48
5.4.440.0930.06319.30
5.4.430.0030.06319.63
5.4.420.0100.05319.63
5.4.410.0070.05719.00
5.4.400.0270.06018.81
5.4.390.0400.07318.80
5.4.380.0430.06718.71
5.4.370.0370.05318.73
5.4.360.0230.06018.74
5.4.350.0370.05018.75
5.4.340.0430.04718.79
5.4.320.0370.05718.73
5.4.310.0430.06318.73
5.4.300.0430.07018.74
5.4.290.0470.05718.74
5.4.280.0270.07718.56
5.4.270.0500.06018.70
5.4.260.0270.07318.59
5.4.250.0500.05018.62
5.4.240.0430.08718.53
5.4.230.0330.08018.75
5.4.220.0370.08718.76
5.4.210.0530.07318.74
5.4.200.0270.06016.60
5.4.190.0300.06018.68
5.4.180.0130.06718.77
5.4.170.0370.08018.49
5.4.160.0400.07718.45
5.4.150.0300.05718.77
5.4.140.0330.05716.34
5.4.130.0300.05716.46
5.4.120.0470.04716.23
5.4.110.0630.04316.27
5.4.100.0270.06316.25
5.4.90.0330.07016.46
5.4.80.0370.05716.29
5.4.70.0200.06316.33
5.4.60.0400.06316.25
5.4.50.0370.06316.26
5.4.40.0330.05716.23
5.4.30.0430.04716.30
5.4.20.0400.05016.28
5.4.10.0400.05016.26
5.4.00.0470.06015.72
5.3.290.0400.06314.87
5.3.280.0300.06714.82
5.3.270.0430.06014.72
5.3.260.0330.07014.79
5.3.250.0330.05714.66
5.3.240.0230.06714.77
5.3.230.0370.05714.61
5.3.220.0400.05714.69
5.3.210.0570.04314.56
5.3.200.0400.05714.57
5.3.190.0470.05314.73
5.3.180.0300.05014.61
5.3.170.0370.05014.61
5.3.160.0300.05014.79
5.3.150.0370.05714.77
5.3.140.0370.05714.57
5.3.130.0370.07314.68
5.3.120.0370.07714.69
5.3.110.0430.06014.58
5.3.100.0530.06014.07
5.3.90.0330.07714.07
5.3.80.0430.06314.25
5.3.70.0500.06014.13
5.3.60.0370.06314.07
5.3.50.0470.05714.01
5.3.40.0300.06314.18
5.3.30.0330.06714.13
5.3.20.0400.06013.80
5.3.10.0400.05313.76
5.3.00.0230.07313.85
5.2.170.0300.05311.25
5.2.160.0430.04311.18
5.2.150.0400.05711.20
5.2.140.0230.06311.20
5.2.130.0330.05311.15
5.2.120.0300.05711.21
5.2.110.0370.05311.21
5.2.100.0300.04011.23
5.2.90.0300.05711.09
5.2.80.0400.04711.15
5.2.70.0370.06011.30
5.2.60.0300.06311.09
5.2.50.0300.05311.01
5.2.40.0430.03311.11
5.2.30.0270.05311.03
5.2.20.0230.04311.07
5.2.10.0430.04010.91
5.2.00.0200.06010.74
5.1.60.0170.04310.04
5.1.50.0170.04010.03
5.1.40.0300.03710.05
5.1.30.0130.04310.56
5.1.20.0230.03710.48
5.1.10.0270.04310.25
5.1.00.0300.03010.20
5.0.50.0170.0278.56
5.0.40.0130.0338.44
5.0.30.0100.0578.27
5.0.20.0070.0408.33
5.0.10.0070.0438.28
5.0.00.0100.0438.29
4.4.90.0100.0336.54
4.4.80.0070.0236.54
4.4.70.0070.0276.54
4.4.60.0030.0276.54
4.4.50.0070.0236.54
4.4.40.0100.0336.54
4.4.30.0070.0276.54
4.4.20.0100.0236.54
4.4.10.0070.0236.54
4.4.00.0070.0376.54
4.3.110.0100.0276.54
4.3.100.0170.0206.54
4.3.90.0100.0276.54
4.3.80.0070.0406.54
4.3.70.0100.0206.54
4.3.60.0070.0236.54
4.3.50.0000.0306.54
4.3.40.0070.0376.54
4.3.30.0000.0276.54
4.3.20.0070.0206.54
4.3.10.0030.0236.54
4.3.00.0130.0237.12

preferences:
52.8 ms | 401 KiB | 5 Q