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) . 'toto';

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.0140.00316.50
8.3.50.0100.00622.07
8.3.40.0140.00018.64
8.3.30.0140.00018.79
8.3.20.0070.00020.09
8.3.10.0060.00323.53
8.3.00.0080.00019.25
8.2.180.0090.00918.41
8.2.170.0100.01022.96
8.2.160.0100.00320.53
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00022.26
8.2.110.0040.00422.33
8.2.100.0030.00719.70
8.2.90.0070.00019.28
8.2.80.0060.00317.97
8.2.70.0060.00317.38
8.2.60.0050.00317.91
8.2.50.0080.00018.07
8.2.40.0000.00819.82
8.2.30.0000.00817.80
8.2.20.0040.00417.61
8.2.10.0050.00318.02
8.2.00.0000.00817.52
8.1.280.0120.00925.92
8.1.270.0030.00623.83
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0090.00023.85
8.1.230.0030.00718.97
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0060.00317.13
8.1.190.0080.00017.10
8.1.180.0100.00019.01
8.1.170.0050.00318.52
8.1.160.0000.00721.82
8.1.150.0060.00318.48
8.1.140.0040.00417.31
8.1.130.0030.00317.75
8.1.120.0000.00817.30
8.1.110.0040.00417.32
8.1.100.0030.00517.33
8.1.90.0040.00417.34
8.1.80.0000.00717.31
8.1.70.0030.00517.13
8.1.60.0030.00517.32
8.1.50.0000.00917.36
8.1.40.0000.00717.44
8.1.30.0040.00417.41
8.1.20.0000.00817.36
8.1.10.0070.00017.37
8.1.00.0000.00817.25
8.0.300.0070.00018.77
8.0.290.0000.00717.03
8.0.280.0050.00218.36
8.0.270.0030.00317.22
8.0.260.0000.00617.05
8.0.250.0030.00316.83
8.0.240.0030.00316.78
8.0.230.0070.00016.79
8.0.220.0030.00316.65
8.0.210.0030.00316.63
8.0.200.0000.00816.79
8.0.190.0030.00516.70
8.0.180.0080.00016.80
8.0.170.0000.00716.68
8.0.160.0000.00716.69
8.0.150.0050.00316.66
8.0.140.0070.00316.61
8.0.130.0030.00313.44
8.0.120.0040.00416.59
8.0.110.0040.00416.75
8.0.100.0040.00416.80
8.0.90.0040.00416.65
8.0.80.0120.00316.70
8.0.70.0040.00416.54
8.0.60.0000.00716.73
8.0.50.0040.00416.68
8.0.30.0090.00917.02
8.0.20.0080.01217.40
8.0.10.0040.00416.68
8.0.00.0110.01016.46
7.4.330.0050.00015.00
7.4.320.0030.00316.44
7.4.300.0000.00616.46
7.4.290.0060.00616.35
7.4.280.0030.00316.45
7.4.270.0050.00216.31
7.4.260.0070.00016.44
7.4.250.0000.00716.42
7.4.240.0040.00416.45
7.4.230.0070.00016.48
7.4.220.0030.01316.54
7.4.210.0100.00416.44
7.4.200.0000.00716.45
7.4.190.0080.00016.54
7.4.160.0060.01016.33
7.4.150.0030.01517.40
7.4.140.0080.00917.86
7.4.130.0100.00816.30
7.4.120.0130.00516.43
7.4.110.0120.00616.21
7.4.100.0070.01016.58
7.4.90.0100.00716.49
7.4.80.0180.00619.39
7.4.70.0090.00916.18
7.4.60.0060.01116.25
7.4.50.0060.00316.38
7.4.40.0100.01016.30
7.4.30.0070.01016.37
7.3.330.0080.00013.22
7.3.320.0020.00212.97
7.3.310.0030.00316.26
7.3.300.0000.00716.11
7.3.290.0030.01016.18
7.3.280.0100.00916.12
7.3.270.0110.00617.40
7.3.260.0030.01316.23
7.3.250.0110.00616.29
7.3.240.0090.00816.29
7.3.230.0150.00016.42
7.3.210.0110.00716.55
7.3.200.0060.01319.39
7.3.190.0120.01216.16
7.3.180.0090.00616.05
7.3.170.0040.01116.49
7.3.160.0100.00716.46
7.2.330.0120.00616.33
7.2.320.0070.01016.52
7.2.310.0060.01216.64
7.2.300.0110.01116.21
7.2.290.0130.00316.30
5.4.320.0080.03512.45
5.4.310.0090.03712.45
5.4.300.0040.04112.45
5.4.290.0090.04012.43
5.4.280.0050.03912.33
5.4.270.0110.03412.33
5.4.260.0040.04212.33
5.4.250.0060.04012.33
5.4.240.0060.03812.33
5.4.230.0080.03712.32
5.4.220.0020.04212.32
5.4.210.0090.03712.32
5.4.200.0080.05412.32
5.4.190.0100.04212.32
5.4.180.0080.03812.32
5.4.170.0070.03812.33
5.4.160.0140.03112.33
5.4.150.0080.03612.32
5.4.140.0070.05012.01
5.4.130.0110.05312.00
5.4.120.0080.05311.95
5.4.110.0090.04711.95
5.4.100.0110.04511.95
5.4.90.0080.06011.95
5.4.80.0060.05011.95
5.4.70.0090.03511.94
5.4.60.0060.05011.95
5.4.50.0080.04211.94
5.4.40.0080.03711.93
5.4.30.0070.04211.93
5.4.20.0120.07511.93
5.4.10.0110.04911.93
5.4.00.0080.05011.42
5.3.290.0060.03912.80
5.3.280.0090.04612.71
5.3.270.0120.04812.72
5.3.260.0090.04912.72
5.3.250.0110.04412.71
5.3.240.0060.05312.72
5.3.230.0040.04212.71
5.3.220.0060.03812.68
5.3.210.0080.05512.68
5.3.200.0080.03812.68
5.3.190.0050.04012.68
5.3.180.0040.04212.67
5.3.170.0070.04612.67
5.3.160.0050.04512.67
5.3.150.0120.05012.67
5.3.140.0090.04712.66
5.3.130.0030.04912.66
5.3.120.0070.04412.66
5.3.110.0050.04012.66
5.3.100.0080.03612.12
5.3.90.0090.05212.09
5.3.80.0090.04812.08
5.3.70.0050.05312.07
5.3.60.0070.05112.06
5.3.50.0060.05112.00
5.3.40.0050.04312.00
5.3.30.0060.06011.94
5.3.20.0080.04511.72
5.3.10.0070.05111.69
5.3.00.0080.05411.67

preferences:
41.54 ms | 401 KiB | 5 Q