3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $bar; public function __construct(BarInterface $bar) { $this->bar = $bar; } public function doAction() { $bar->getVar(); } } interface BarInterface { public function getVar(); } abstract class BarAbscract implements BarInterface { public function getVar() { return $this->var; } } class Bar extends BarAbscract { protected $var = __CLASS__; } class Baz extends BarAbstract { protected $var = __CLASS__; } $bar = new Bar(); $foo = new Foo($bar); $foo->doAction();

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.0090.00616.63
8.3.50.0110.00821.99
8.3.40.0040.01118.84
8.3.30.0150.00018.79
8.3.20.0040.00420.25
8.3.10.0020.00523.71
8.3.00.0090.00019.15
8.2.180.0120.00316.63
8.2.170.0070.00722.96
8.2.160.0110.00320.39
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00019.36
8.2.120.0080.00026.35
8.2.110.0060.00320.42
8.2.100.0040.00817.93
8.2.90.0050.00319.14
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0000.00817.80
8.2.50.0000.00818.07
8.2.40.0000.00819.47
8.2.30.0070.00320.62
8.2.20.0030.00617.68
8.2.10.0000.00718.07
8.2.00.0040.00418.11
8.1.280.0080.00825.92
8.1.270.0110.00024.02
8.1.260.0070.00028.09
8.1.250.0070.00028.09
8.1.240.0060.00324.03
8.1.230.0040.00719.57
8.1.220.0000.00817.76
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0030.00520.34
8.1.160.0040.00421.93
8.1.150.0000.00718.82
8.1.140.0030.00519.56
8.1.130.0000.00717.63
8.1.120.0040.00417.42
8.1.110.0070.00017.40
8.1.100.0000.00717.45
8.1.90.0040.00417.44
8.1.80.0000.00717.42
8.1.70.0060.00317.33
8.1.60.0040.00417.53
8.1.50.0040.00417.45
8.1.40.0040.00417.43
8.1.30.0070.00317.61
8.1.20.0000.00717.54
8.1.10.0040.00417.59
8.1.00.0040.00417.41
8.0.300.0080.00018.77
8.0.290.0040.00416.75
8.0.280.0070.00018.43
8.0.270.0000.00817.20
8.0.260.0000.00617.25
8.0.250.0040.00416.99
8.0.240.0030.00317.02
8.0.230.0000.00717.01
8.0.220.0040.00416.89
8.0.210.0040.00416.98
8.0.200.0040.00717.00
8.0.190.0000.00916.99
8.0.180.0040.00416.87
8.0.170.0080.00016.99
8.0.160.0000.00717.04
8.0.150.0030.00316.84
8.0.140.0070.00016.98
8.0.130.0000.00513.45
8.0.120.0070.00016.96
8.0.110.0040.00416.79
8.0.100.0070.00016.86
8.0.90.0080.00016.85
8.0.80.0060.01016.89
8.0.70.0040.00416.79
8.0.60.0040.00416.86
8.0.50.0000.00816.81
8.0.30.0080.01116.90
8.0.20.0160.01017.40
8.0.10.0000.00716.91
8.0.00.0110.00916.70
7.4.330.0050.00016.73
7.4.320.0030.00316.55
7.4.300.0060.00016.46
7.4.290.0070.00016.45
7.4.280.0030.00516.54
7.4.270.0030.00316.48
7.4.260.0080.00016.45
7.4.250.0030.00616.52
7.4.240.0040.00416.56
7.4.230.0030.00316.36
7.4.220.0060.01416.61
7.4.210.0090.00816.51
7.4.200.0000.00816.57
7.4.160.0040.01216.23
7.4.150.0070.01017.40
7.4.140.0120.00717.86
7.4.130.0140.00816.67
7.4.120.0080.00816.46
7.4.110.0120.00616.54
7.4.100.0090.00916.59
7.4.90.0190.00316.39
7.4.80.0090.00919.39
7.4.70.0110.00616.39
7.4.60.0060.01016.53
7.4.50.0100.00616.48
7.4.40.0070.01016.44
7.4.30.0120.00916.27
7.4.10.0060.01316.61
7.4.00.0040.01215.94
7.3.330.0030.00313.27
7.3.320.0000.00513.30
7.3.310.0030.00316.19
7.3.300.0050.00216.34
7.3.290.0050.00316.32
7.3.280.0090.01116.33
7.3.270.0090.00917.40
7.3.260.0170.00416.33
7.3.250.0110.00716.40
7.3.240.0080.01016.39
7.3.230.0080.00816.51
7.3.210.0100.01016.44
7.3.200.0000.01616.29
7.3.190.0100.00716.48
7.3.180.0160.00016.39
7.3.170.0140.00416.42
7.3.160.0100.00716.23
7.3.130.0060.01216.27
7.3.120.0070.00716.36
7.3.110.0000.01616.34
7.3.100.0100.00716.29
7.3.90.0000.01516.33
7.3.80.0090.00616.29
7.3.70.0060.00916.36
7.3.60.0120.00616.40
7.3.50.0070.00716.49
7.3.40.0060.00616.30
7.3.30.0070.01416.41
7.3.20.0090.00918.11
7.3.10.0080.00817.18
7.3.00.0110.00617.30
7.2.330.0120.00616.27
7.2.320.0160.00316.52
7.2.310.0120.00316.63
7.2.300.0120.00616.44
7.2.290.0140.00316.46
7.2.260.0070.01316.38
7.2.250.0020.01216.51
7.2.240.0030.01616.40
7.2.230.0090.00916.50
7.2.220.0000.01816.55
7.2.210.0060.00616.56
7.2.200.0030.01216.38
7.2.190.0120.00016.36
7.2.180.0070.01016.46
7.2.170.0030.00716.21
7.2.160.0030.01016.49
7.2.150.0060.01218.23
7.2.140.0070.01118.28
7.2.130.0130.00717.39
7.2.120.0080.00617.59
7.2.110.0070.01117.29
7.2.100.0050.01417.20
7.2.90.0080.00817.39
7.2.80.0100.00717.37
7.2.70.0110.00517.33
7.2.60.0070.00817.08
7.2.50.0100.01217.47
7.2.40.0100.00817.29
7.2.30.0100.01017.39
7.2.20.0110.00517.19
7.2.10.0060.00917.32
7.2.00.0050.00617.94
7.1.330.0100.00717.39
7.1.320.0040.01117.26
7.1.310.0100.00317.30
7.1.300.0060.00317.09
7.1.290.0040.01117.16
7.1.280.0000.01017.30
7.1.270.0060.01217.37
7.1.260.0070.00717.22
7.1.250.0080.00616.16
7.1.240.0090.00617.15
7.1.230.0080.00817.25
7.1.220.0030.01017.25
7.1.210.0000.01217.30
7.1.200.0100.00516.47
7.1.190.0100.00317.19
7.1.180.0060.01017.15
7.1.170.0040.01117.00
7.1.160.0060.01217.16
7.1.150.0130.00317.27
7.1.140.0060.00916.98
7.1.130.0000.01517.06
7.1.120.0000.01317.25
7.1.110.0030.00917.24
7.1.100.0080.00817.46
7.1.90.0120.00317.15
7.1.80.0040.01117.17
7.1.70.0040.01217.18
7.1.60.0030.01118.33
7.1.50.0080.01217.05
7.1.40.0060.00917.25
7.1.30.0030.01017.25
7.1.20.0060.00917.13
7.1.10.0070.00717.29
7.1.00.0070.04019.67
7.0.330.0060.00617.00
7.0.320.0030.01016.88
7.0.310.0120.00616.84
7.0.300.0070.01016.74
7.0.290.0160.00316.86
7.0.280.0030.00616.80
7.0.270.0100.00716.95
7.0.260.0040.00716.84
7.0.250.0070.00316.91
7.0.240.0090.00916.93
7.0.230.0060.00916.85
7.0.220.0100.00616.81
7.0.210.0070.01017.10
7.0.200.0240.00815.78
7.0.190.0100.00716.92
7.0.180.0030.01217.09
7.0.170.0050.00916.87
7.0.160.0110.00417.05
7.0.150.0030.00916.88
7.0.140.0100.00317.02
7.0.130.0040.00416.94
7.0.120.0070.01016.96
7.0.110.0040.01516.79
7.0.100.0030.01316.80
7.0.90.0000.01916.79
7.0.80.0060.00616.87
7.0.70.0160.00016.93
7.0.60.0030.04718.41
7.0.50.0080.02117.42
7.0.40.0050.03017.42
7.0.30.0190.02217.64
7.0.20.0210.03917.51
7.0.10.0100.04017.41
7.0.00.0100.04317.58
5.6.400.0150.00015.52
5.6.390.0150.00015.65
5.6.380.0030.01015.72
5.6.370.0060.01015.91
5.6.360.0060.01015.86
5.6.350.0070.00715.64
5.6.340.0030.01015.86
5.6.330.0030.01315.96
5.6.320.0070.01015.83
5.6.310.0000.01615.95
5.6.300.0080.00315.69
5.6.290.0030.00715.69
5.6.280.0050.03518.38
5.6.270.0190.00015.73
5.6.260.0110.00715.95
5.6.250.0100.00715.71
5.6.240.0060.01315.73
5.6.230.0000.01515.79
5.6.220.0070.00715.98
5.6.210.0050.03518.12
5.6.200.0030.03916.90
5.6.190.0070.03018.14
5.6.180.0120.02518.12
5.6.170.0140.02218.14
5.6.160.0040.04717.96
5.6.150.0070.04316.92
5.6.140.0070.02316.99
5.6.130.0040.03217.06
5.6.120.0120.03818.42
5.6.110.0080.03918.40
5.6.100.0050.03018.34
5.6.90.0080.04518.43
5.6.80.0050.04517.91
5.6.70.0040.01115.79
5.6.60.0070.00715.61
5.6.50.0030.01315.64
5.6.40.0060.00915.87
5.6.30.0030.01315.71
5.6.20.0000.01415.75
5.6.10.0030.00615.73
5.6.00.0100.00315.66
5.5.380.0000.01015.60
5.5.370.0000.01515.57
5.5.360.0030.01315.70
5.5.350.0250.03318.01
5.5.340.0040.02416.77
5.5.330.0170.02018.03
5.5.320.0040.03518.05
5.5.310.0170.01718.10
5.5.300.0070.02516.88
5.5.290.0080.04316.86
5.5.280.0060.04318.28
5.5.270.0050.04518.36
5.5.260.0020.02618.22
5.5.250.0030.04318.07
5.5.240.0160.03217.83
5.5.230.0090.00315.55
5.5.220.0030.00615.75
5.5.210.0030.01315.55
5.5.200.0110.00715.72
5.5.190.0090.00915.52
5.5.180.0060.00615.38
5.5.170.0030.00615.60
5.5.160.0080.00815.64
5.5.150.0040.01115.82
5.5.140.0000.01515.72
5.5.130.0000.01215.46
5.5.120.0000.01015.36
5.5.110.0090.00615.47
5.5.100.0030.01115.63
5.5.90.0030.01015.24
5.5.80.0030.01215.51
5.5.70.0060.00915.39
5.5.60.0000.01215.55
5.5.50.0080.00815.61
5.5.40.0060.00615.60
5.5.30.0060.00615.40
5.5.20.0040.00715.59
5.5.10.0060.00615.68
5.5.00.0030.00615.45

preferences:
70.21 ms | 401 KiB | 5 Q