3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(mb_strwidth("’", "UTF-8")); var_dump(mb_strwidth("(", "UTF-8")); var_dump(mb_strwidth("ー", "UTF-8")); var_dump(mb_strwidth("=", "UTF-8")); var_dump(mb_strwidth("^", "UTF-8")); var_dump(mb_strwidth("~", "UTF-8")); var_dump(mb_strwidth("¥", "UTF-8")); var_dump(mb_strwidth("①", "UTF-8"));
based on f1Ref
Output for 4.3.11 - 4.4.9, 5.0.3 - 7.2.0
int(1) int(2) int(2) int(2) int(2) int(2) int(2) int(1)
Output for 4.3.0 - 4.3.10, 5.0.0 - 5.0.2
int(2) int(2) int(2) int(2) int(2) int(2) int(2) int(2)