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 1; 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.40.0150.00318.52
8.3.30.0090.00618.95
8.3.20.0050.00220.26
8.3.10.0070.00023.66
8.3.00.0090.00019.13
8.2.170.0070.00722.96
8.2.160.0110.00420.51
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0120.00326.16
8.2.120.0040.00422.24
8.2.110.0100.00022.32
8.2.100.0000.01117.66
8.2.90.0040.00419.07
8.2.80.0040.00417.97
8.2.70.0080.00017.50
8.2.60.0000.00819.64
8.2.50.0040.00418.07
8.2.40.0000.00819.95
8.2.30.0000.00818.00
8.2.20.0050.00317.57
8.2.10.0000.00817.95
8.2.00.0070.00017.41
8.1.270.0040.00423.71
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00323.91
8.1.230.0040.00719.09
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0080.00017.10
8.1.180.0060.00318.10
8.1.170.0080.00018.51
8.1.160.0030.00521.85
8.1.150.0030.00718.48
8.1.140.0040.00417.34
8.1.130.0070.00017.79
8.1.120.0050.00217.35
8.1.110.0000.00717.21
8.1.100.0070.00017.14
8.1.90.0030.00317.27
8.1.80.0030.00517.16
8.1.70.0000.00717.28
8.1.60.0030.00617.41
8.1.50.0040.00417.25
8.1.40.0080.00017.36
8.1.30.0060.00317.44
8.1.20.0000.00817.48
8.1.10.0000.00817.30
8.1.00.0000.00817.39
8.0.300.0070.00018.77
8.0.290.0070.00017.18
8.0.280.0000.00718.41
8.0.270.0070.00017.09
8.0.260.0000.00817.10
8.0.250.0030.00316.82
8.0.240.0070.00016.80
8.0.230.0070.00016.80
8.0.220.0050.00316.72
8.0.210.0050.00216.67
8.0.200.0000.00616.80
8.0.190.0040.00416.67
8.0.180.0050.00316.78
8.0.170.0070.00016.66
8.0.160.0020.00516.77
8.0.150.0070.00016.79
8.0.140.0090.00016.62
8.0.130.0000.00513.30
8.0.120.0040.00416.61
8.0.110.0070.00016.78
8.0.100.0040.00416.61
8.0.90.0040.00416.64
8.0.80.0060.00916.81
8.0.70.0000.00716.55
8.0.60.0040.00416.61
8.0.50.0000.00716.76
8.0.30.0060.01216.88
8.0.20.0090.01117.40
8.0.10.0030.00416.88
8.0.00.0080.01116.77
7.4.330.0020.00215.03
7.4.320.0070.00016.46
7.4.300.0000.00616.41
7.4.290.0000.00716.34
7.4.280.0000.00816.26
7.4.270.0040.00416.38
7.4.260.0040.00316.35
7.4.250.0030.00516.23
7.4.240.0020.00516.46
7.4.230.0000.00716.20
7.4.220.0120.00616.42
7.4.210.0120.00316.38
7.4.200.0030.00316.25
7.4.190.0000.00716.50
7.4.160.0100.01316.45
7.4.150.0130.00317.40
7.4.140.0050.01217.86
7.4.130.0110.00616.35
7.4.120.0110.00816.30
7.4.110.0130.00716.38
7.4.100.0120.01116.28
7.4.90.0070.01016.35
7.4.80.0070.01319.39
7.4.70.0100.01016.38
7.4.60.0160.00016.34
7.4.50.0030.00616.18
7.4.40.0090.00916.48
7.4.30.0080.00816.36
7.3.330.0000.00613.05
7.3.320.0000.00513.07
7.3.310.0070.00016.22
7.3.300.0030.00316.16
7.3.290.0070.00716.16
7.3.280.0100.00716.12
7.3.270.0160.00017.40
7.3.260.0130.01016.01
7.3.250.0150.00616.22
7.3.240.0040.01316.34
7.3.230.0100.01016.39
7.3.210.0030.01316.14
7.3.200.0120.00619.39
7.3.190.0120.00915.99
7.3.180.0080.00816.06
7.3.170.0120.00316.34
7.3.160.0070.01016.23
7.2.330.0160.00616.24
7.2.320.0140.00316.55
7.2.310.0040.01216.50
7.2.300.0120.00316.37
7.2.290.0070.01416.37
5.4.320.0060.03712.45
5.4.310.0080.03612.45
5.4.300.0070.03712.45
5.4.290.0130.09012.43
5.4.280.0170.08512.33
5.4.270.0120.07212.33
5.4.260.0080.08312.33
5.4.250.0150.05512.33
5.4.240.0080.06612.33
5.4.230.0080.03812.32
5.4.220.0070.03812.32
5.4.210.0070.03712.32
5.4.200.0100.04112.32
5.4.190.0060.03912.32
5.4.180.0050.05412.32
5.4.170.0090.06412.33
5.4.160.0100.07412.33
5.4.150.0120.05812.32
5.4.140.0100.09012.01
5.4.130.0140.07012.00
5.4.120.0080.11011.95
5.4.110.0100.06811.95
5.4.100.0110.06311.95
5.4.90.0130.06611.95
5.4.80.0070.06211.95
5.4.70.0140.06011.95
5.4.60.0140.06411.95
5.4.50.0060.04611.95
5.4.40.0080.03911.93
5.4.30.0210.08611.93
5.4.20.0050.03911.93
5.4.10.0060.03811.93
5.4.00.0090.04711.42
5.3.290.0100.03712.80
5.3.280.0060.04212.71
5.3.270.0080.04212.73
5.3.260.0190.09212.72
5.3.250.0150.06712.72
5.3.240.0140.05412.72
5.3.230.0110.06012.71
5.3.220.0100.05212.68
5.3.210.0090.05312.68
5.3.200.0110.05112.68
5.3.190.0120.04512.67
5.3.180.0100.05912.68
5.3.170.0120.04812.67
5.3.160.0070.05412.67
5.3.150.0230.06012.67
5.3.140.0080.05712.66
5.3.130.0150.09112.66
5.3.120.0300.07812.66
5.3.110.0140.06612.66
5.3.100.0100.05612.12
5.3.90.0090.05112.08
5.3.80.0080.04812.08
5.3.70.0100.04512.07
5.3.60.0120.04312.07
5.3.50.0100.04712.00
5.3.40.0080.05012.00
5.3.30.0070.05211.94
5.3.20.0130.04311.72
5.3.10.0080.06011.69
5.3.00.0190.05111.67

preferences:
43.05 ms | 400 KiB | 5 Q