3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(NAN == NAN); var_dump(NAN === NAN); var_dump(array(NAN) == array(NAN)); var_dump(array(NAN) === array(NAN)); $a = array(NAN); var_dump($a == $a); var_dump($a === $a); $b = $a; var_dump($a == $b); var_dump($a === $b);
based on VUdnu
Output for 5.3.15 - 5.3.29, 5.4.5 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.2.6
bool(false) bool(false) bool(false) bool(false) bool(true) bool(true) bool(true) bool(true)
Output for 4.3.6 - 5.3.14, 5.4.0 - 5.4.4
bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false)
Output for 4.3.0 - 4.3.5
Notice: Use of undefined constant NAN - assumed 'NAN' in /in/1d9gn on line 3 Notice: Use of undefined constant NAN - assumed 'NAN' in /in/1d9gn on line 3 bool(true) Notice: Use of undefined constant NAN - assumed 'NAN' in /in/1d9gn on line 4 Notice: Use of undefined constant NAN - assumed 'NAN' in /in/1d9gn on line 4 bool(true) Notice: Use of undefined constant NAN - assumed 'NAN' in /in/1d9gn on line 5 Notice: Use of undefined constant NAN - assumed 'NAN' in /in/1d9gn on line 5 bool(true) Notice: Use of undefined constant NAN - assumed 'NAN' in /in/1d9gn on line 6 Notice: Use of undefined constant NAN - assumed 'NAN' in /in/1d9gn on line 6 bool(true) Notice: Use of undefined constant NAN - assumed 'NAN' in /in/1d9gn on line 7 bool(true) bool(true) bool(true) bool(true)