3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $search = 'Hello world.'; $test = 'world'; $pos = strpos($search, $test); echo $pos + "\r\n"; if (!$pos) echo "1. Not found"; else echo "1. Found"; echo "\r\n"; if ($pos != true) echo "2. Not found"; else echo "2. Found"; echo "\r\n"; if ($pos === false) echo "3. Not found"; else echo "3. Found"; echo "\r\n"; if ($pos == false) echo "4. Not found"; else echo "4. Found"; ?>
based on TYt5s
Output for 7.1.0 - 7.2.0
Warning: A non-numeric value encountered in /in/OEONE on line 8 61. Found 2. Found 3. Found 4. Found
Output for 5.3.22 - 7.0.20
61. Found 2. Found 3. Found 4. Found