3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $code = "en-h-us"; var_dump(substr($code, strrpos(code, "-")));
based on ho4oK
Output for 7.2.0 - 7.3.0alpha1
Warning: Use of undefined constant code - assumed 'code' (this will throw an Error in a future version of PHP) in /in/9vaoe on line 3 string(7) "en-h-us"
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.7
Notice: Use of undefined constant code - assumed 'code' in /in/9vaoe on line 3 string(7) "en-h-us"