3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Question { public function __construct(AnswerInterface $answer) { echo "What is 2 + 2?\n"; $answer = $answer->get()->the()->answer(); if ($answer instanceof AnswerInterface) { echo $answer . PHP_EOL; } } } interface AnswerInterface { public function get(); public function the(); public function answer(); } // start editing here class Answer implements AnswerInterface { public function get(){ return $this; } public function the(){ return $this; } public function answer(){ return $this; } } // end editing here $answer = new Answer; $question = new Question($answer);

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.50
8.3.50.0170.00317.58
8.3.40.0140.00018.79
8.3.30.0110.00418.45
8.3.20.0080.00018.64
8.3.10.0060.00320.52
8.3.00.0060.00319.38
8.2.180.0070.00716.63
8.2.170.0090.00622.96
8.2.160.0090.00919.29
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0000.00819.25
8.2.110.0090.00021.02
8.2.100.0040.00817.91
8.2.90.0060.00319.47
8.2.80.0000.00719.21
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0000.00918.28
8.2.30.0000.00817.98
8.2.20.0050.00317.64
8.2.10.0000.00817.74
8.2.00.0060.00617.62
8.1.280.0100.00325.92
8.1.270.0000.00824.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.52
8.1.230.0030.00721.04
8.1.220.0030.00617.74
8.1.210.0040.00418.93
8.1.200.0030.00617.35
8.1.190.0050.00317.43
8.1.180.0030.00518.10
8.1.170.0050.00318.84
8.1.160.0030.00518.98
8.1.150.0040.00418.55
8.1.140.0000.00717.46
8.1.130.0070.00017.75
8.1.120.0070.00017.39
8.1.110.0040.00417.47
8.1.100.0000.00717.46
8.1.90.0040.00417.39
8.1.80.0030.00517.37
8.1.70.0000.00717.48
8.1.60.0090.00017.60
8.1.50.0040.00417.48
8.1.40.0040.00417.56
8.1.30.0040.00417.69
8.1.20.0020.00517.51
8.1.10.0040.00417.56
8.1.00.0000.00717.50
8.0.300.0040.00420.04
8.0.290.0050.00316.88
8.0.280.0040.00418.52
8.0.270.0050.00217.13
8.0.260.0030.00316.89
8.0.250.0070.00017.01
8.0.240.0070.00017.06
8.0.230.0000.00716.90
8.0.220.0070.00016.91
8.0.210.0000.00716.91
8.0.200.0030.00316.99
8.0.190.0040.00416.86
8.0.180.0000.00716.94
8.0.170.0000.00816.86
8.0.160.0000.00716.95
8.0.150.0030.00616.94
8.0.140.0060.00216.93
8.0.130.0030.00313.39
8.0.120.0040.00416.81
8.0.110.0020.00516.79
8.0.100.0030.00616.78
8.0.90.0000.00816.98
8.0.80.0090.00616.89
8.0.70.0040.00416.81
8.0.60.0040.00416.77
8.0.50.0040.00416.95
8.0.30.0150.00417.26
8.0.20.0110.00816.98
8.0.10.0040.00417.07
8.0.00.0100.01016.95
7.4.330.0000.00413.01
7.4.320.0000.00716.51
7.4.300.0030.00316.45
7.4.290.0040.00416.61
7.4.280.0040.00416.55
7.4.270.0030.00316.46
7.4.260.0000.00613.30
7.4.250.0000.00716.54
7.4.240.0000.00716.57
7.4.230.0070.00016.65
7.4.220.0030.01416.56
7.4.210.0030.01016.56
7.4.200.0000.00716.44
7.4.190.0080.00016.76
7.4.160.0140.00716.59
7.4.150.0220.00416.38
7.4.140.0150.00516.54
7.4.130.0080.00916.62
7.4.120.0120.00516.59
7.4.110.0100.00716.57
7.4.100.0060.00916.52
7.4.90.0030.01516.54
7.4.80.0120.00619.39
7.4.70.0070.01016.38
7.4.60.0070.00916.54
7.4.50.0000.00716.36
7.4.40.0090.00916.42
7.4.30.0110.00616.78
7.4.00.0060.01015.14
7.3.330.0000.00613.14
7.3.320.0050.00013.35
7.3.310.0000.00716.15
7.3.300.0070.00016.36
7.3.290.0090.01316.30
7.3.280.0070.00916.31
7.3.270.0090.00916.34
7.3.260.0110.00616.52
7.3.250.0090.00816.44
7.3.240.0000.01716.47
7.3.230.0100.00716.37
7.3.210.0060.00916.46
7.3.200.0110.00616.42
7.3.190.0130.01016.57
7.3.180.0130.00316.40
7.3.170.0080.00916.45
7.3.160.0000.02016.44
7.3.120.0030.01214.93
7.3.10.0300.01316.63
7.3.00.0320.00916.39
7.2.330.0100.00716.54
7.2.320.0100.01016.59
7.2.310.0210.00616.88
7.2.300.0100.00616.75
7.2.290.0070.01116.75
7.2.130.0090.01016.89
7.2.120.0130.00616.74
7.2.110.0130.00716.86
7.2.100.0070.01016.73
7.2.90.0140.00316.96
7.2.80.0120.00316.92
7.2.70.0080.00817.00
7.2.60.0090.00616.86
7.2.50.0140.00916.87
7.2.40.0180.00516.98
7.2.30.0090.00617.09
7.2.20.0110.00716.86
7.2.10.0140.00716.83
7.2.00.0110.00418.07
7.1.250.0130.00615.71
7.1.200.0000.01415.75
7.1.100.0030.00918.28
7.1.70.0000.01017.20
7.1.60.0150.00919.40
7.1.50.0000.01116.63
7.1.00.0030.06022.35
7.0.200.0370.00614.70
7.0.140.0070.07022.09
7.0.120.0070.07322.18
7.0.60.0000.08019.91
7.0.50.0000.07317.86
7.0.40.0130.07717.80
7.0.30.0100.08017.76
7.0.20.0000.07017.68
7.0.10.0100.07317.79
7.0.00.0070.05017.72
5.6.280.0070.07021.01
5.6.210.0000.08020.76
5.6.200.0030.08718.16
5.6.190.0100.08318.15
5.6.180.0170.07718.19
5.6.170.0130.05018.15
5.6.160.0030.08318.19
5.6.150.0070.07718.19
5.6.140.0070.08018.23
5.6.130.0070.08718.14
5.6.120.0030.08318.13
5.6.110.0100.07718.24
5.6.100.0070.07318.24
5.6.90.0000.09018.16
5.6.80.0170.05017.69
5.6.70.0070.07317.55
5.6.60.0000.08717.64
5.6.50.0070.08017.50
5.6.40.0100.08717.64
5.6.30.0070.08017.53
5.6.20.0130.07317.54
5.6.10.0100.07317.57
5.6.00.0070.07717.52
5.5.350.0100.08020.45
5.5.340.0100.07718.09
5.5.330.0070.05718.08
5.5.320.0130.07317.93
5.5.310.0130.07317.95
5.5.300.0200.05717.98
5.5.290.0030.08717.92
5.5.280.0030.08717.98
5.5.270.0170.07017.97
5.5.260.0130.07018.04
5.5.250.0030.08317.80
5.5.240.0230.05717.38
5.5.230.0100.07017.31
5.5.220.0000.05317.42
5.5.210.0070.07017.37
5.5.200.0100.07317.49
5.5.190.0030.06717.31
5.5.180.0070.08017.36
5.5.160.0100.07017.44
5.5.150.0130.05317.29
5.5.140.0070.07717.29
5.5.130.0070.06317.33
5.5.120.0100.07717.30
5.5.110.0130.07717.30
5.5.100.0070.07717.21
5.5.90.0130.07717.18
5.5.80.0130.06317.21
5.5.70.0100.06017.23
5.5.60.0030.07017.19
5.5.50.0030.06317.21
5.5.40.0000.05017.21
5.5.30.0170.06317.19
5.5.20.0070.05717.19
5.5.10.0070.05717.18
5.5.00.0100.07317.27
5.4.450.0100.05719.34
5.4.440.0100.07019.43
5.4.430.0030.07719.20
5.4.420.0100.06319.44
5.4.410.0000.07319.29
5.4.400.0100.07319.05
5.4.390.0100.07318.98
5.4.380.0100.06319.06
5.4.370.0130.06719.09
5.4.360.0130.06719.03
5.4.350.0100.07319.14
5.4.340.0370.05719.12
5.4.320.0100.06719.11
5.4.310.0000.08319.12
5.4.300.0070.06718.98
5.4.290.0070.07719.11
5.4.280.0030.07019.00
5.4.270.0070.08319.05
5.4.260.0130.06019.05
5.4.250.0070.07318.94
5.4.240.0070.08319.04
5.4.230.0100.07019.00
5.4.220.0100.07319.04
5.4.210.0070.07719.12
5.4.200.0130.06719.26
5.4.190.0030.06719.09
5.4.180.0030.07719.00
5.4.170.0070.07719.25
5.4.160.0100.06019.11
5.4.150.0070.07719.11
5.4.140.0070.07316.36
5.4.130.0130.07316.57
5.4.120.0100.05316.44
5.4.110.0030.08016.39
5.4.100.0070.07716.53
5.4.90.0070.04716.34
5.4.80.0170.06716.49
5.4.70.0070.07316.33
5.4.60.0030.07016.40
5.4.50.0070.06716.28
5.4.40.0070.07716.26
5.4.30.0170.05716.26
5.4.20.0070.04716.23
5.4.10.0100.07716.45
5.4.00.0070.06315.67
5.3.290.0100.07714.88
5.3.280.0170.06714.64
5.3.270.0000.06314.46
5.3.260.0030.08714.67
5.3.250.0100.07014.66
5.3.240.0070.06014.57
5.3.230.0030.07014.62
5.3.220.0000.08014.64
5.3.210.0100.08314.59
5.3.200.0130.07014.64
5.3.190.0130.07314.67
5.3.180.0130.07314.52
5.3.170.0030.07714.61
5.3.160.0070.07314.78
5.3.150.0170.06714.78
5.3.140.0070.05714.66
5.3.130.0130.05014.61
5.3.120.0030.04714.63
5.3.110.0100.07714.65
5.3.100.0070.06314.07
5.3.90.0130.07314.06
5.3.80.0130.06714.11
5.3.70.0070.07014.08
5.3.60.0200.06014.04
5.3.50.0030.07313.97
5.3.40.0100.05014.01
5.3.30.0070.07013.94
5.3.20.0030.05013.75
5.3.10.0070.06013.72
5.3.00.0100.06713.70
5.2.170.0070.05711.21
5.2.160.0070.05711.16
5.2.150.0100.06311.16
5.2.140.0070.06011.19
5.2.130.0070.04711.13
5.2.120.0070.05711.12
5.2.110.0070.05711.19
5.2.100.0030.06010.95
5.2.90.0030.05311.12
5.2.80.0030.06711.14
5.2.70.0070.06310.98
5.2.60.0070.05011.11
5.2.50.0030.03311.08
5.2.40.0070.02711.07
5.2.30.0030.03011.02
5.2.20.0030.05010.95
5.2.10.0000.04710.89
5.2.00.0070.03310.75
5.1.60.0030.02710.23
5.1.50.0070.03010.05
5.1.40.0000.0579.97
5.1.30.0030.04010.34
5.1.20.0070.05310.57
5.1.10.0000.06310.07
5.1.00.0000.05710.11
5.0.50.0030.0278.61
5.0.40.0100.0308.40
5.0.30.0030.0608.21
5.0.20.0000.0438.27
5.0.10.0070.0378.18
5.0.00.0030.0538.15
4.4.90.0100.0307.55
4.4.80.0070.0307.55
4.4.70.0030.0337.55
4.4.60.0030.0337.55
4.4.50.0000.0307.55
4.4.40.0130.0207.55
4.4.30.0030.0377.55
4.4.20.0000.0307.55
4.4.10.0100.0337.55
4.4.00.0000.0437.55
4.3.110.0000.0237.55
4.3.100.0030.0307.55
4.3.90.0000.0307.55
4.3.80.0070.0437.55
4.3.70.0100.0277.55
4.3.60.0030.0237.55
4.3.50.0100.0237.55
4.3.40.0000.0577.55
4.3.30.0000.0337.55
4.3.20.0000.0377.55
4.3.10.0000.0377.55
4.3.00.0000.0277.55

preferences:
44.21 ms | 401 KiB | 5 Q