3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function isDiff($old, $new) { if ($old === null || is_string($old) && ($new === null || is_bool($new) || is_numeric($new)) && strcmp($old, $new) === 0) { return false; } return true; } var_dump(isDiff("05", 5)); var_dump(isDiff(5, 5.0)); var_dump(isDiff(true, 1));
Output for 4.3.0 - 7.2.0
bool(true) bool(true) bool(true)