3v4l.org

run code in 300+ PHP versions simultaneously
<?hh class MyClass { public function alpha(): int { return 1; } public function beta(): string { return 'hi test'; } } function f(MyClass $my_inst): int { return $my_inst->alpha(); } $o = new MyClass(); echo $o->beta(); echo f($o);

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.0120.00616.63
8.3.50.0130.00521.88
8.3.40.0070.00718.77
8.3.30.0070.01418.96
8.3.20.0070.00020.07
8.3.10.0000.00823.48
8.3.00.0030.00619.13
8.2.180.0070.01118.39
8.2.170.0110.00422.96
8.2.160.0110.00420.24
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00322.08
8.2.110.0030.00622.16
8.2.100.0080.00317.91
8.2.90.0040.00419.23
8.2.80.0030.00517.97
8.2.70.0030.00617.50
8.2.60.0030.00517.68
8.2.50.0000.00818.07
8.2.40.0030.00619.82
8.2.30.0040.00417.83
8.2.20.0000.00817.47
8.2.10.0070.00017.83
8.2.00.0040.00417.52
8.1.280.0060.01225.92
8.1.270.0080.00023.79
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0070.00418.70
8.1.230.0090.00319.15
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.22
8.1.190.0040.00416.98
8.1.180.0060.00318.88
8.1.170.0040.00418.53
8.1.160.0020.00521.98
8.1.150.0060.00318.43
8.1.140.0070.00017.30
8.1.130.0000.00717.75
8.1.120.0000.00817.25
8.1.110.0050.00317.26
8.1.100.0000.00717.28
8.1.90.0000.00717.31
8.1.80.0040.00417.33
8.1.70.0080.00017.27
8.1.60.0000.00817.34
8.1.50.0040.00417.35
8.1.40.0040.00417.38
8.1.30.0000.00917.38
8.1.20.0080.00017.55
8.1.10.0070.00017.38
8.1.00.0070.00017.25
8.0.300.0040.00418.77
8.0.290.0000.00717.16
8.0.280.0000.00718.41
8.0.270.0030.00517.18
8.0.260.0030.00317.05
8.0.250.0000.00716.83
8.0.240.0040.00416.69
8.0.230.0030.00316.66
8.0.220.0030.00316.80
8.0.210.0040.00416.64
8.0.200.0030.00316.77
8.0.190.0080.00016.81
8.0.180.0030.00316.77
8.0.170.0000.00716.78
8.0.160.0000.00716.72
8.0.150.0070.00016.82
8.0.140.0030.00616.54
8.0.130.0000.00513.28
8.0.120.0070.00016.64
8.0.110.0070.00016.76
8.0.100.0050.00216.56
8.0.90.0030.00516.64
8.0.80.0040.01116.67
8.0.70.0040.00416.53
8.0.60.0080.00016.63
8.0.50.0040.00416.79
8.0.30.0130.00817.03
8.0.20.0140.00417.40
8.0.10.0000.00816.81
8.0.00.0070.01116.70
7.4.330.0050.00015.03
7.4.320.0030.00316.37
7.4.300.0030.00316.34
7.4.290.0000.00916.28
7.4.280.0030.00316.36
7.4.270.0000.00716.27
7.4.260.0030.00316.43
7.4.250.0050.00316.42
7.4.240.0020.00516.31
7.4.230.0030.00316.36
7.4.220.0060.01216.44
7.4.210.0040.01116.38
7.4.200.0030.00316.26
7.4.190.0040.00416.41
7.4.160.0060.00916.43
7.4.150.0180.00017.40
7.4.140.0070.01517.86
7.4.130.0090.01016.30
7.4.120.0110.00516.39
7.4.110.0140.00316.28
7.4.100.0030.01416.40
7.4.90.0170.00016.34
7.4.80.0150.00619.39
7.4.70.0070.00916.37
7.4.60.0040.01116.34
7.4.50.0040.00416.21
7.4.40.0140.01116.32
7.4.30.0090.00916.43
7.3.330.0000.00713.22
7.3.320.0020.00213.28
7.3.310.0000.00716.19
7.3.300.0070.00016.16
7.3.290.0060.00816.11
7.3.280.0080.00916.15
7.3.270.0110.00717.40
7.3.260.0110.00616.05
7.3.250.0140.00716.28
7.3.240.0100.01116.12
7.3.230.0140.00616.43
7.3.210.0060.01016.47
7.3.200.0110.01119.39
7.3.190.0110.01116.31
7.3.180.0000.01616.32
7.3.170.0090.01216.27
7.3.160.0060.00916.32
7.2.330.0090.00916.29
7.2.320.0050.01516.22
7.2.310.0030.01616.38
7.2.300.0040.01816.64
7.2.290.0130.00316.17
5.4.320.0020.04012.45
5.4.310.0090.03512.45
5.4.300.0070.04812.45
5.4.290.0160.07612.43
5.4.280.0090.04912.33
5.4.270.0110.07512.33
5.4.260.0230.10312.33
5.4.250.0210.06812.33
5.4.240.0090.08412.33
5.4.230.0100.05212.32
5.4.220.0080.05212.32
5.4.210.0110.05012.32
5.4.200.0070.05412.32
5.4.190.0070.03512.32
5.4.180.0060.03712.32
5.4.170.0160.06512.33
5.4.160.0170.05612.32
5.4.150.0070.04112.32
5.4.140.0090.04412.00
5.4.130.0110.03911.99
5.4.120.0110.03411.95
5.4.110.0190.07811.95
5.4.100.0050.04011.95
5.4.90.0110.06511.95
5.4.80.0120.06011.95
5.4.70.0090.04211.95
5.4.60.0190.05211.95
5.4.50.0090.05011.95
5.4.40.0060.04711.93
5.4.30.0090.05211.93
5.4.20.0190.09111.93
5.4.10.0140.07211.93
5.4.00.0140.07411.42
5.3.290.0060.04112.80
5.3.280.0090.04912.71
5.3.270.0070.04712.72
5.3.260.0090.05412.72
5.3.250.0190.09612.72
5.3.240.0090.04812.72
5.3.230.0060.04512.71
5.3.220.0100.06212.68
5.3.210.0080.04412.68
5.3.200.0060.04712.68
5.3.190.0090.04412.68
5.3.180.0070.03912.67
5.3.170.0070.04012.67
5.3.160.0040.04512.67
5.3.150.0090.05312.68
5.3.140.0110.08412.66
5.3.130.0210.09812.66
5.3.120.0220.06912.66
5.3.110.0100.10812.65
5.3.100.0180.08112.11
5.3.90.0100.06712.09
5.3.80.0270.11612.07
5.3.70.0110.06812.07
5.3.60.0150.08312.06
5.3.50.0120.07912.00
5.3.40.0150.07112.00
5.3.30.0060.05711.94
5.3.20.0060.05011.71
5.3.10.0120.05811.69
5.3.00.0060.04111.67

preferences:
40.71 ms | 401 KiB | 5 Q