3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $subject = "AWB012345"; $result = strpos($subject, "AWB0") === 0; var_dump($result); $subject = "12345"; $result = strpos($subject, "AWB0") === 0; var_dump($result); $subject = "AWB012345"; $result = substr($subject, 0, 4) == "AWB0"; var_dump($result); $subject = "12345"; $result = substr($subject, 0, 4) == "AWB0"; var_dump($result);
based on ucuNA
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
bool(true) bool(false) bool(true) bool(false)
Output for hhvm-3.10.0

Process exited with code 153.