3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function get_country_code() { $cc = 'US'; return $cc; } function get_country_name() { $cn_array = array( 'COUNTRY_NAME' => array( 'AF' => 'Afghanistan', 'US' => 'United Snakes', 'RU' => 'VodkaTown', ), ); $country_code = 'US'; $country_name = $cn_array['COUNTRY_NAME'][$country_code]; } echo $country_name;
based on RnBfr
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: country_name in /in/vlKSX on line 25
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: country_name in /in/vlKSX on line 25