3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'test'; $return = strpos($a, 't'); if (0) echo '1'; if ($return) echo '2'; if ($return === 0) echo '3'; if ($return === false) echo '4';

preferences:
38.86 ms | 402 KiB | 5 Q