3v4l.org

run code in 500+ PHP versions simultaneously
<?php $one = 3 * 0.333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333; var_dump($one); // float(1) var_dump(1 === $one); $float = 1 / 3 * 3; var_dump( $float ); $int = 3 / 3; var_dump( $int ); print ini_get('precision').PHP_EOL; // 14 three -------------- $notOne = 3 * 0.33333333333333; print $notOne; ?>

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.5.70.0090.00716.69
8.5.60.0090.00816.61
8.5.50.0110.00516.64
8.4.220.0050.00919.48
8.4.210.0150.00619.48
8.4.90.0130.00819.59
8.3.310.0080.00518.30
8.3.180.0090.00618.50
8.3.50.0100.00818.48
8.2.310.0110.00818.10

preferences:
42.03 ms | 525 KiB | 5 Q