3v4l.org

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