3v4l.org

run code in 200+ php & hhvm versions
<?php echo "NAN < 1.0: "; var_dump(NAN < 1.0); echo "NAN <= 1.0: "; var_dump(NAN <= 1.0); echo "NAN == 1.0: "; var_dump(NAN == 1.0); echo "NAN != 1.0: "; var_dump(NAN != 1.0); echo "NAN === 1.0: "; var_dump(NAN === 1.0); echo "NAN !== 1.0: "; var_dump(NAN !== 1.0); echo "NAN > 1.0: "; var_dump(NAN > 1.0); echo "NAN >= 1.0: "; var_dump(NAN >= 1.0);
Output for 5.4.0 - 5.6.28, 7.1.10 - 7.2.6
NAN < 1.0: bool(false) NAN <= 1.0: bool(false) NAN == 1.0: bool(false) NAN != 1.0: bool(true) NAN === 1.0: bool(false) NAN !== 1.0: bool(true) NAN > 1.0: bool(false) NAN >= 1.0: bool(false)
Output for 4.3.6 - 5.3.29, 7.0.0 - 7.1.7
NAN < 1.0: bool(true) NAN <= 1.0: bool(true) NAN == 1.0: bool(false) NAN != 1.0: bool(true) NAN === 1.0: bool(false) NAN !== 1.0: bool(true) NAN > 1.0: bool(true) NAN >= 1.0: bool(true)
Output for 4.3.0 - 4.3.5
NAN < 1.0: Notice: Use of undefined constant NAN - assumed 'NAN' in /in/XRDRs on line 3 bool(true) NAN <= 1.0: Notice: Use of undefined constant NAN - assumed 'NAN' in /in/XRDRs on line 4 bool(true) NAN == 1.0: Notice: Use of undefined constant NAN - assumed 'NAN' in /in/XRDRs on line 5 bool(false) NAN != 1.0: Notice: Use of undefined constant NAN - assumed 'NAN' in /in/XRDRs on line 6 bool(true) NAN === 1.0: Notice: Use of undefined constant NAN - assumed 'NAN' in /in/XRDRs on line 7 bool(false) NAN !== 1.0: Notice: Use of undefined constant NAN - assumed 'NAN' in /in/XRDRs on line 8 bool(true) NAN > 1.0: Notice: Use of undefined constant NAN - assumed 'NAN' in /in/XRDRs on line 9 bool(false) NAN >= 1.0: Notice: Use of undefined constant NAN - assumed 'NAN' in /in/XRDRs on line 10 bool(false)