3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $identifier = "a@z.com"; $identifier2 = "another"; echo "Original"; echo "B: " . (strpos($identifier, '@') === false ? false : true) ."\n"; echo "B: " . (strpos($identifier2, '@') === false ? false : true) ."\n"; echo "\n"; echo "Improve"; echo "B: " . ((bool) strpos($identifier, '@') !== false) ."\n"; echo "B: " . ((bool) strpos($identifier2, '@') !== false) ."\n";
Output for 4.3.0 - 7.2.0
OriginalB: 1 B: ImproveB: 1 B: