3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? $test = '&#x4E2D;'; $anchor = html_entity_decode($test, ENT_COMPAT, 'UTF-8'); echo $anchor; if (preg_match("/[\p{Han}]/simu", $anchor)) { echo 'Yay'; } ?>
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
中Yay
Output for 4.3.0 - 5.3.29
<? $test = '&#x4E2D;'; $anchor = html_entity_decode($test, ENT_COMPAT, 'UTF-8'); echo $anchor; if (preg_match("/[\p{Han}]/simu", $anchor)) { echo 'Yay'; } ?>