3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(strpos('foo', '')); var_dump(strpos('', 'foo')); var_dump(strpos('', ''));
Output for 5.3.22 - 5.3.29, 5.4.12 - 5.6.38, 7.0.0 - 7.2.12
Warning: strpos(): Empty needle in /in/lADCh on line 3 bool(false) bool(false) Warning: strpos(): Empty needle in /in/lADCh on line 7 bool(false)
Output for hhvm-3.22.0
Warning: Empty delimiter in /in/lADCh on line -1 bool(false) bool(false) Warning: Empty delimiter in /in/lADCh on line -1 bool(false)
Output for hhvm-3.10.1 - 3.21.3
Warning: Empty delimiter in /in/lADCh on line 3 bool(false) bool(false) Warning: Empty delimiter in /in/lADCh on line 7 bool(false)
Output for 5.2.5 - 5.3.21, 5.4.0 - 5.4.11
Warning: strpos(): Empty delimiter in /in/lADCh on line 3 bool(false) bool(false) Warning: strpos(): Empty delimiter in /in/lADCh on line 7 bool(false)
Output for 4.3.2 - 5.2.4
Warning: strpos(): Empty delimiter. in /in/lADCh on line 3 bool(false) bool(false) Warning: strpos(): Empty delimiter. in /in/lADCh on line 7 bool(false)
Output for 4.3.0 - 4.3.1
Warning: strpos() [http://www.php.net/function.strpos]: Empty delimiter. in /in/lADCh on line 3 bool(false) bool(false) Warning: strpos() [http://www.php.net/function.strpos]: Empty delimiter. in /in/lADCh on line 7 bool(false)