3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(strpos("test", "t")); //true var_dump(strpos("test", "")); //false var_dump(strpos("test", "test")); //true var_dump(strpos("test", "testa")); //flase var_dump(strpos("a----z", "a")); //true var_dump(strpos("a----z", "z")); //true
Output for 5.3.22 - 5.3.29, 5.4.12 - 7.1.0
int(0) Warning: strpos(): Empty needle in /in/1Nvf8 on line 3 bool(false) int(0) bool(false) int(0) int(5)
Output for 5.2.5 - 5.3.21, 5.4.0 - 5.4.11
int(0) Warning: strpos(): Empty delimiter in /in/1Nvf8 on line 3 bool(false) int(0) bool(false) int(0) int(5)
Output for 4.3.2 - 5.0.5, 5.1.1 - 5.2.4
int(0) Warning: strpos(): Empty delimiter. in /in/1Nvf8 on line 3 bool(false) int(0) bool(false) int(0) int(5)
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/1Nvf8 on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
int(0) Warning: strpos() [http://www.php.net/function.strpos]: Empty delimiter. in /in/1Nvf8 on line 3 bool(false) int(0) bool(false) int(0) int(5)