3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(setlocale('LC_ALL', 'en_SG')); var_dump(preg_match_all('/\\w+/u', "-foo-barлолbaz-", $m), $m);
based on tCWv2
Output for 7.0.0 - 7.2.6
Warning: setlocale() expects parameter 1 to be integer, string given in /in/orZi2 on line 2 NULL int(2) array(1) { [0]=> array(2) { [0]=> string(3) "foo" [1]=> string(12) "barлолbaz" } }
Output for 5.3.20 - 5.6.28
Deprecated: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead in /in/orZi2 on line 2 bool(false) int(2) array(1) { [0]=> array(2) { [0]=> string(3) "foo" [1]=> string(12) "barлолbaz" } }