3v4l.org

run code in 200+ 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.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.2.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) }