3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $bar = 10; public function foo(A $other) { $other->bar = 10; } public function getBar() { return $this->bar; } } class B extends A { public function frobnicate(A $other) { $other->bar = 20; } } $a = new A(); $b = new B(); $b->frobnicate($a); print $a->getBar();

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.0120.00418.30
8.3.60.0140.00016.75
8.3.50.0070.01121.95
8.3.40.0040.01118.97
8.3.30.0060.01119.14
8.3.20.0000.00820.46
8.3.10.0000.00721.90
8.3.00.0060.00319.34
8.2.180.0070.00718.28
8.2.170.0070.01022.96
8.2.160.0070.00720.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.12
8.2.110.0090.00019.27
8.2.100.0000.01217.75
8.2.90.0050.00319.23
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0080.00017.93
8.2.50.0060.00318.07
8.2.40.0030.00620.07
8.2.30.0000.00818.09
8.2.20.0040.00417.69
8.2.10.0080.00018.05
8.2.00.0040.00417.56
8.1.280.0140.00325.92
8.1.270.0090.00618.74
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00619.21
8.1.230.0070.00317.66
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0040.00417.23
8.1.190.0040.00417.34
8.1.180.0060.00318.10
8.1.170.0040.00418.54
8.1.160.0000.00822.00
8.1.150.0030.00518.83
8.1.140.0000.00717.43
8.1.130.0000.00717.83
8.1.120.0000.00817.33
8.1.110.0070.00017.47
8.1.100.0040.00417.41
8.1.90.0030.00517.39
8.1.80.0050.00317.23
8.1.70.0000.00717.42
8.1.60.0060.00317.62
8.1.50.0050.00317.57
8.1.40.0030.00717.52
8.1.30.0050.00317.61
8.1.20.0040.00417.62
8.1.10.0000.00717.59
8.1.00.0040.00717.50
8.0.300.0000.00818.77
8.0.290.0000.00716.63
8.0.280.0030.00318.38
8.0.270.0040.00417.29
8.0.260.0030.00317.25
8.0.250.0070.00016.88
8.0.240.0040.00416.98
8.0.230.0050.00316.94
8.0.220.0070.00016.82
8.0.210.0040.00416.88
8.0.200.0030.00316.96
8.0.190.0030.00616.85
8.0.180.0040.00416.83
8.0.170.0040.00416.91
8.0.160.0030.00316.85
8.0.150.0030.00316.86
8.0.140.0000.00716.87
8.0.130.0000.00613.41
8.0.120.0000.00716.87
8.0.110.0040.00416.81
8.0.100.0050.00316.70
8.0.90.0000.00816.88
8.0.80.0050.01016.94
8.0.70.0050.00316.70
8.0.60.0050.00216.76
8.0.50.0000.00716.95
8.0.30.0120.01016.96
8.0.20.0120.01017.40
8.0.10.0040.00417.13
8.0.00.0120.00816.83
7.4.330.0000.00515.03
7.4.320.0040.00416.50
7.4.300.0000.00616.50
7.4.290.0030.00316.58
7.4.280.0050.00316.59
7.4.270.0000.00716.61
7.4.260.0030.00316.58
7.4.250.0000.00716.61
7.4.240.0020.00516.56
7.4.230.0030.00316.41
7.4.220.0100.01416.51
7.4.210.0080.01316.57
7.4.200.0000.00716.39
7.4.160.0130.00316.33
7.4.150.0140.00417.40
7.4.140.0090.00917.86
7.4.130.0080.01116.42
7.4.120.0110.00916.59
7.4.110.0140.01016.46
7.4.100.0070.01116.62
7.4.90.0070.01716.60
7.4.80.0060.01219.39
7.4.70.0070.01016.48
7.4.60.0030.01416.27
7.4.50.0030.00616.53
7.4.40.0060.01316.40
7.4.30.0110.01116.48
7.4.00.0050.01114.93
7.3.330.0030.00313.17
7.3.320.0120.00013.17
7.3.310.0000.00716.12
7.3.300.0030.00316.20
7.3.290.0060.00016.17
7.3.280.0090.00516.29
7.3.270.0100.00717.40
7.3.260.0090.01516.32
7.3.250.0080.01216.44
7.3.240.0000.01716.48
7.3.230.0040.01416.62
7.3.210.0030.01316.39
7.3.200.0170.00019.39
7.3.190.0150.00616.59
7.3.180.0070.01316.30
7.3.170.0080.00816.30
7.3.160.0180.00316.58
7.3.120.0030.01314.80
7.3.110.0070.01114.86
7.3.100.0000.01414.63
7.3.90.0090.00614.92
7.3.80.0120.00014.79
7.3.70.0070.01114.92
7.3.60.0060.00314.92
7.3.50.0120.00614.49
7.3.40.0000.01514.73
7.3.30.0100.00714.78
7.3.20.0110.00416.61
7.3.10.0060.00816.42
7.3.00.0100.00316.16
7.2.330.0090.01216.54
7.2.320.0090.00616.63
7.2.310.0150.01116.79
7.2.300.0090.00916.54
7.2.290.0100.00616.65
7.2.250.0090.00615.23
7.2.240.0130.00715.07
7.2.230.0100.00715.11
7.2.220.0100.00315.05
7.2.210.0070.00715.17
7.2.200.0030.01014.95
7.2.190.0000.01514.95
7.2.180.0070.00714.87
7.2.170.0070.01114.87
7.2.130.0120.00316.66
7.2.120.0040.00916.45
7.2.110.0090.00616.58
7.2.100.0030.01016.66
7.2.90.0260.00316.48
7.2.80.0140.00016.64
7.2.70.0040.01116.74
7.2.60.0090.00416.80
7.2.50.0140.00316.33
7.2.40.0120.00916.79
7.2.30.0090.00916.77
7.2.20.0110.00616.68
7.2.10.0110.00416.49
7.2.00.0120.00518.25
7.1.330.0040.01115.75
7.1.320.0030.01015.78
7.1.310.0030.01015.73
7.1.300.0070.00715.72
7.1.290.0070.00715.46
7.1.280.0000.01115.55
7.1.270.0030.01015.82
7.1.260.0130.00315.87
7.1.250.0030.01015.57
7.1.200.0060.00615.84
7.1.100.0000.01417.98
7.1.70.0040.01117.26
7.1.60.0100.01419.50
7.1.50.0060.01216.91
7.1.00.0000.08022.40
7.0.200.0160.01016.63
7.0.140.0000.07722.09
7.0.60.0000.04319.95
7.0.50.0070.08017.85
7.0.40.0100.08320.10
7.0.30.0300.08020.26
7.0.20.0200.04020.19
7.0.10.0170.04720.20
7.0.00.0000.09320.23
5.6.280.0100.06720.79
5.6.210.0070.08020.67
5.6.200.0070.04318.27
5.6.190.0100.06720.63
5.6.180.0270.03720.30
5.6.170.0170.05020.47
5.6.160.0030.05020.46
5.6.150.0070.03718.15
5.6.140.0070.07318.15
5.6.130.0000.07318.23
5.6.120.0030.06021.11
5.6.110.0070.08721.12
5.6.100.0200.06321.13
5.6.90.0100.06720.97
5.6.80.0170.07320.51
5.6.70.0200.03320.43
5.5.350.0100.04720.41
5.5.340.0070.03718.01
5.5.330.0130.05720.29
5.5.320.0100.08020.41
5.5.310.0230.05720.28
5.5.300.0030.06018.03
5.5.290.0130.07018.02
5.5.280.0070.08720.78
5.5.270.0130.07320.80
5.5.260.0100.04320.93
5.5.250.0100.03320.58
5.5.240.0070.06320.19
5.4.450.0630.05319.61
5.4.440.0900.06019.69
5.4.430.1070.05319.38
5.4.420.1000.05319.18
5.4.410.1100.04719.45
5.4.400.0230.06318.89
5.4.390.0470.05018.46
5.4.380.0430.07018.54
5.4.370.0300.07318.56
5.4.360.0170.06018.48
5.4.350.0370.04318.74
5.4.340.0230.06718.57
5.4.320.0270.07018.77
5.4.310.0230.06318.58
5.4.300.0370.05318.75
5.4.290.0230.05318.75
5.4.280.0230.05318.74
5.4.270.0300.05018.62
5.4.260.0800.05718.55
5.4.250.0100.07318.47
5.4.240.0230.05718.79
5.4.230.0230.05718.49
5.4.220.0230.07018.73
5.4.210.0270.07318.76
5.4.200.0270.05316.58
5.4.190.0130.06018.76
5.4.180.0300.05318.57
5.4.170.0200.06718.74
5.4.160.0270.05318.51
5.4.150.0270.06018.51
5.4.140.0300.05716.47
5.4.130.0270.05716.27
5.4.120.0370.05716.30
5.4.110.0200.04716.27
5.4.100.0170.05716.22
5.4.90.0170.06016.28
5.4.80.0300.04716.26
5.4.70.0200.05016.32
5.4.60.0070.06016.43
5.4.50.0230.04716.20
5.4.40.0100.06316.23
5.4.30.0230.05016.22
5.4.20.0270.04716.24
5.4.10.0170.05016.22
5.4.00.0200.05015.75
5.3.290.0100.06714.80
5.3.280.0070.06714.70
5.3.270.0300.06314.71
5.3.260.0330.05014.79
5.3.250.0230.06714.63
5.3.240.0200.07314.73
5.3.230.0330.06014.71
5.3.220.0300.04714.60
5.3.210.0230.05314.59
5.3.200.0230.06014.61
5.3.190.0330.06714.71
5.3.180.0230.06714.70
5.3.170.0300.05014.69
5.3.160.0300.07014.61
5.3.150.0200.06014.56
5.3.140.0200.05314.59
5.3.130.0330.06014.68
5.3.120.0300.06714.57
5.3.110.0230.05714.68
5.3.100.0200.05314.07
5.3.90.0170.05314.02
5.3.80.0170.06314.14
5.3.70.0130.06314.25
5.3.60.0200.05714.06
5.3.50.0200.05314.07
5.3.40.0270.04714.00
5.3.30.0230.06014.02
5.3.20.0170.06013.76
5.3.10.0270.05013.79
5.3.00.0200.05313.87
5.2.170.0130.05011.36
5.2.160.0230.04311.15
5.2.150.0130.06011.38
5.2.140.0100.05311.20
5.2.130.0100.04711.23
5.2.120.0230.03711.14
5.2.110.0200.04011.15
5.2.100.0200.04311.11
5.2.90.0130.04711.09
5.2.80.0130.04711.10
5.2.70.0170.04311.13
5.2.60.0230.03711.26
5.2.50.0130.05011.10
5.2.40.0130.04011.00
5.2.30.0130.04311.11
5.2.20.0170.04011.14
5.2.10.0130.04010.90
5.2.00.0070.05310.79
5.1.60.0170.03310.00
5.1.50.0230.03310.18
5.1.40.0070.04010.00
5.1.30.0270.05010.55
5.1.20.0130.03710.36
5.1.10.0100.04310.26
5.1.00.0100.04010.20
5.0.50.0030.0378.58
5.0.40.0070.0438.54
5.0.30.0030.0508.27
5.0.20.0070.0308.20
5.0.10.0030.0408.21
5.0.00.0100.0478.15
4.4.90.0100.0207.26
4.4.80.0100.0237.26
4.4.70.0130.0207.26
4.4.60.0130.0207.26
4.4.50.0030.0337.26
4.4.40.0030.0437.26
4.4.30.0100.0207.26
4.4.20.0070.0237.26
4.4.10.0030.0277.26
4.4.00.0070.0337.26
4.3.110.0130.0307.26
4.3.100.0170.0177.26
4.3.90.0000.0277.26
4.3.80.0100.0407.26
4.3.70.0030.0237.26
4.3.60.0100.0207.26
4.3.50.0070.0237.26
4.3.40.0070.0337.26
4.3.30.0070.0207.26
4.3.20.0030.0237.26
4.3.10.0030.0277.26
4.3.00.0130.0207.01

preferences:
63.57 ms | 401 KiB | 5 Q