3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $primary = 0; echo ($primary || $primary === "0" || $primary === 0) ? 1 : 0; echo "\n\r"; $primary = "0"; echo ($primary || $primary === "0" || $primary === 0) ? 1 : 0; echo "\n\r"; $primary = NULL; echo ($primary || $primary === "0" || $primary === 0) ? 1 : 0; echo "\n\r"; $primary = ''; echo ($primary || $primary === "0" || $primary === 0) ? 1 : 0; echo "\n\r";
Output for 4.3.0 - 7.1.0
1 1 0 0