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 PHP_EOL; 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.0040.01116.38
8.3.50.0110.00621.94
8.3.40.0110.00318.59
8.3.30.0120.00319.05
8.3.20.0070.00020.04
8.3.10.0040.00423.48
8.3.00.0040.00419.26
8.2.180.0070.01118.18
8.2.170.0040.01122.96
8.2.160.0090.00420.53
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0090.00626.16
8.2.120.0000.00722.26
8.2.110.0040.00422.29
8.2.100.0040.00817.59
8.2.90.0080.00019.05
8.2.80.0080.00017.97
8.2.70.0040.00417.38
8.2.60.0070.00017.80
8.2.50.0030.00618.07
8.2.40.0040.00419.76
8.2.30.0050.00217.91
8.2.20.0050.00317.55
8.2.10.0000.00817.84
8.2.00.0000.00717.56
8.1.280.0070.01025.92
8.1.270.0000.00823.90
8.1.260.0030.00626.35
8.1.250.0050.00328.09
8.1.240.0060.00323.96
8.1.230.0080.00418.98
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0000.00917.22
8.1.190.0040.00417.11
8.1.180.0030.00619.01
8.1.170.0030.00518.49
8.1.160.0000.00721.89
8.1.150.0000.01018.45
8.1.140.0000.00717.30
8.1.130.0030.00317.66
8.1.120.0000.00717.35
8.1.110.0040.00417.20
8.1.100.0040.00417.28
8.1.90.0040.00417.29
8.1.80.0040.00417.33
8.1.70.0070.00017.25
8.1.60.0060.00317.39
8.1.50.0030.00517.35
8.1.40.0000.00717.37
8.1.30.0030.00617.49
8.1.20.0080.00017.46
8.1.10.0020.00517.46
8.1.00.0030.00517.22
8.0.300.0000.00718.77
8.0.290.0000.00716.91
8.0.280.0040.00418.41
8.0.270.0000.00717.13
8.0.260.0060.00017.08
8.0.250.0030.00316.82
8.0.240.0030.00316.70
8.0.230.0000.00716.86
8.0.220.0030.00316.70
8.0.210.0070.00016.75
8.0.200.0040.00416.89
8.0.190.0030.00616.68
8.0.180.0080.00316.82
8.0.170.0050.00316.67
8.0.160.0040.00416.79
8.0.150.0000.00716.74
8.0.140.0100.00016.69
8.0.130.0060.00013.40
8.0.120.0000.00816.68
8.0.110.0050.00316.70
8.0.100.0040.00416.70
8.0.90.0080.00016.61
8.0.80.0090.00616.68
8.0.70.0020.00516.81
8.0.60.0040.00416.54
8.0.50.0000.00716.69
8.0.30.0170.00516.80
8.0.20.0140.00417.40
8.0.10.0040.00416.73
8.0.00.0180.00416.64
7.4.330.0050.00015.07
7.4.320.0060.00016.46
7.4.300.0020.00516.38
7.4.290.0100.00016.50
7.4.280.0080.00016.38
7.4.270.0040.00416.46
7.4.260.0000.00716.44
7.4.250.0000.00716.31
7.4.240.0070.00016.29
7.4.230.0000.00716.48
7.4.220.0060.01116.46
7.4.210.0060.00816.32
7.4.200.0000.00716.39
7.4.190.0030.00516.62
7.4.160.0100.00616.34
7.4.150.0030.01417.40
7.4.140.0120.00717.86
7.4.130.0100.00716.25
7.4.120.0070.01116.49
7.4.110.0090.01216.43
7.4.100.0140.00316.41
7.4.90.0040.01216.34
7.4.80.0120.00619.39
7.4.70.0090.01116.34
7.4.60.0080.00816.04
7.4.50.0000.00816.26
7.4.40.0130.00816.33
7.4.30.0120.00416.46
7.3.330.0040.00413.22
7.3.320.0020.00213.07
7.3.310.0040.00416.18
7.3.300.0030.00316.12
7.3.290.0030.01016.17
7.3.280.0100.00916.12
7.3.270.0110.00717.40
7.3.260.0200.00516.34
7.3.250.0090.00916.28
7.3.240.0110.00716.39
7.3.230.0030.01416.39
7.3.210.0070.01016.20
7.3.200.0090.00919.39
7.3.190.0110.01116.21
7.3.180.0090.00616.09
7.3.170.0060.00916.27
7.3.160.0080.00816.39
7.2.330.0110.00716.47
7.2.320.0060.01016.48
7.2.310.0180.00016.67
7.2.300.0140.00316.69
7.2.290.0100.00716.54
5.4.320.0060.04112.45
5.4.310.0090.04112.45
5.4.300.0050.04312.45
5.4.290.0080.06112.43
5.4.280.0120.06012.33
5.4.270.0090.07612.33
5.4.260.0110.07512.33
5.4.250.0090.05312.33
5.4.240.0090.06912.33
5.4.230.0060.06012.32
5.4.220.0090.05212.32
5.4.210.0100.05812.32
5.4.200.0110.05512.32
5.4.190.0100.06112.32
5.4.180.0080.04712.32
5.4.170.0110.05212.33
5.4.160.0090.05412.33
5.4.150.0090.04512.32
5.4.140.0100.05512.01
5.4.130.0070.04611.99
5.4.120.0080.03711.95
5.4.110.0070.04411.95
5.4.100.0080.04311.95
5.4.90.0100.06011.95
5.4.80.0100.05311.95
5.4.70.0110.05211.94
5.4.60.0090.03911.94
5.4.50.0090.03511.94
5.4.40.0050.04211.93
5.4.30.0050.05111.93
5.4.20.0080.04711.93
5.4.10.0080.05211.93
5.4.00.0090.05211.42
5.3.290.0080.04112.80
5.3.280.0130.06612.71
5.3.270.0070.06112.73
5.3.260.0110.05412.72
5.3.250.0120.06112.72
5.3.240.0120.05812.72
5.3.230.0100.05212.71
5.3.220.0070.05612.68
5.3.210.0110.06112.68
5.3.200.0080.07112.68
5.3.190.0140.08012.68
5.3.180.0080.04412.67
5.3.170.0100.05312.67
5.3.160.0090.04712.67
5.3.150.0120.05412.67
5.3.140.0090.05712.66
5.3.130.0120.05912.66
5.3.120.0120.06512.66
5.3.110.0060.05212.66
5.3.100.0090.04512.12
5.3.90.0110.06112.08
5.3.80.0120.04812.08
5.3.70.0100.04912.08
5.3.60.0100.04612.06
5.3.50.0120.04512.00
5.3.40.0100.04612.00
5.3.30.0100.04211.94
5.3.20.0100.04411.71
5.3.10.0120.04911.69
5.3.00.0100.05011.67

preferences:
36.46 ms | 401 KiB | 5 Q