3v4l.org

run code in 300+ PHP versions simultaneously
<?php //echo acos(3); var_dump(acos(3) === acos(3)); var_dump(acos(3) == acos(3)); // Note that NAN is a float and becomes 0 var_dump($array = [acos(3) => 3]); var_dump(isset($array[acos(3)])); // Idem pour INF, which is infinity var_dump($array = [INF => 3]); var_dump(isset($array[INF]));
Output for git.master, git.master_jit
bool(false) bool(false) Warning: The float NAN is not representable as an int, cast occurred in /in/N6AoL on line 8 Deprecated: Implicit conversion from float NAN to int loses precision in /in/N6AoL on line 8 array(1) { [0]=> int(3) } Warning: The float NAN is not representable as an int, cast occurred in /in/N6AoL on line 9 Deprecated: Implicit conversion from float NAN to int loses precision in /in/N6AoL on line 9 bool(true) Warning: The float INF is not representable as an int, cast occurred in /in/N6AoL on line 12 array(1) { [0]=> int(3) } Warning: The float INF is not representable as an int, cast occurred in /in/N6AoL on line 13 bool(true)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
57.36 ms | 735 KiB | 4 Q