3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $locale = 'it_ch'; list(,$language) = explode('_', strtolower(str_replace('-', '_', $locale))); echo $language;
Output for 4.3.0 - 7.1.0
ch