3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str[106] = 106; if(strpos($str, "\\'") !== false || strpos($str, '\\"') !== false){ echo "yep"; } else { echo "nope"; } var_dump($str);
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: strpos() expects parameter 1 to be string, array given in /in/XS9EK on line 4 yeparray(1) { [106]=> int(106) }
Output for 4.3.0 - 5.2.17
Notice: Array to string conversion in /in/XS9EK on line 4 Notice: Array to string conversion in /in/XS9EK on line 4 nopearray(1) { [106]=> int(106) }