3v4l.org

run code in 150+ 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 - 5.6.22, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
OriginalB: 1 B: ImproveB: 1 B: