3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = "miauw\u931"; $result = preg_replace('/./uD', '', $string, -1, $count); var_dump( $string, $result, $count );
Output for 5.1.3 - 7.1.0
string(10) "miauw\u931" string(0) "" int(10)
Output for 5.1.0 - 5.1.2
Notice: Undefined variable: count in /in/BeLan on line 5 Notice: Undefined variable: count in /in/BeLan on line 11 string(10) "miauw\u931" string(0) "" NULL
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: count in /in/BeLan on line 5 Warning: Wrong parameter count for preg_replace() in /in/BeLan on line 5 Notice: Undefined variable: count in /in/BeLan on line 10 string(10) "miauw\u931" NULL NULL
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: count in /in/BeLan on line 5 Warning: Wrong parameter count for preg_replace() in /in/BeLan on line 5 Notice: Undefined variable: count in /in/BeLan on line 10 string(10) "miauw\u931" NULL NULL