3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function take_float(float $v) { return $v; }; function ret_float($v): float { return $v; }; $int = 1234; var_dump($int); var_dump(take_float($int)); var_dump(ret_float($int));

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.4.120.0140.00620.58
8.4.110.0030.00622.54
8.4.100.0040.00517.80
8.4.90.0120.00818.73
8.4.80.0100.01017.75
8.4.70.0040.00417.89
8.4.60.0100.01119.00
8.4.50.0110.01019.45
8.4.40.0060.01317.65
8.4.30.0070.01120.21
8.4.20.0080.00017.57
8.4.10.0080.00023.91
8.3.250.0110.00818.82
8.3.240.0100.00716.43
8.3.230.0110.00816.32
8.3.220.0080.00819.00
8.3.210.0050.00216.39
8.3.200.0030.00516.56
8.3.190.0120.00617.29
8.3.180.0100.00316.72
8.3.170.0110.00718.79
8.3.160.0100.01018.51
8.3.150.0040.00420.67
8.3.140.0120.00620.51
8.3.130.0060.00918.36
8.3.120.0000.00818.85
8.3.110.0030.00620.94
8.3.100.0030.01624.06
8.3.90.0100.01026.77
8.3.80.0030.00618.18
8.3.70.0060.01616.63
8.3.60.0120.00316.38
8.3.50.0070.00716.47
8.3.40.0060.00920.06
8.3.30.0110.00419.04
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0000.00926.16
8.2.290.0110.00820.25
8.2.280.0040.00418.29
8.2.270.0140.00317.12
8.2.260.0140.00416.65
8.2.250.0110.00016.45
8.2.240.0030.00618.73
8.2.230.0040.00422.58
8.2.220.0040.01137.54
8.2.210.0070.00726.77
8.2.200.0090.00016.38
8.2.190.0070.00716.63
8.2.180.0120.00918.29
8.2.170.0090.00619.09
8.2.160.0030.01022.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0050.00319.54
8.2.110.0040.00420.56
8.2.100.0110.00019.41
8.2.90.0060.00317.57
8.2.80.0000.00819.00
8.2.70.0120.00879.33
8.2.60.0150.00479.33
8.2.50.0060.01279.33
8.2.40.0140.00479.33
8.2.30.0130.00379.33
8.2.20.0100.00579.33
8.2.10.0120.00479.33
8.2.00.0120.00379.33
8.1.330.0110.00721.97
8.1.320.0090.01016.09
8.1.310.0040.00418.62
8.1.300.0030.00517.75
8.1.290.0070.00430.84
8.1.280.0100.01025.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0070.00319.13
8.1.230.0070.00420.88
8.1.220.0090.00017.74
8.1.210.0030.00518.93
8.1.200.0160.00079.33
8.1.190.0160.00079.33
8.1.180.0110.00579.33
8.1.170.0160.00479.33
8.1.160.0130.00379.33
8.1.150.0120.00579.33
8.1.140.0080.00879.33
8.1.130.0110.00779.33
8.1.120.0120.00679.33
8.1.110.0150.00079.33
8.1.100.0120.00679.33
8.1.90.0120.00479.33
8.1.80.0100.00679.33
8.1.70.0110.00579.33
8.1.60.0180.00079.33
8.1.50.0200.00079.33
8.1.40.0150.00379.33
8.1.30.0080.01179.33
8.1.20.0120.00679.33
8.1.10.0170.00379.33
8.1.00.0110.00679.33
8.0.300.0000.00720.04
8.0.290.0100.00779.33
8.0.280.0100.00779.33
8.0.270.0160.00379.33
8.0.260.0140.00079.33
8.0.250.0140.00379.33
8.0.240.0140.00579.33
8.0.230.0140.00379.33
8.0.220.0090.00679.33
8.0.210.0080.00879.33
8.0.200.0150.00379.33
8.0.190.0100.00679.33
8.0.180.0100.00879.33
8.0.170.0080.00879.33
8.0.160.0160.00079.33
8.0.150.0110.00579.33
8.0.140.0080.00879.33
8.0.130.0160.00379.33
8.0.120.0110.00779.33
8.0.110.0130.00379.33
8.0.100.0150.00279.33
8.0.90.0120.00479.33
8.0.80.0170.00079.33
8.0.70.0170.00379.33
8.0.60.0110.00879.33
8.0.50.0160.00079.33
8.0.30.0170.00079.33
8.0.20.0110.00579.33
8.0.10.0160.00079.33

preferences:
26.82 ms | 403 KiB | 5 Q