3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = "🚁"; $foo = mb_convert_encoding($foo, "UTF-8"); var_dump($foo); var_dump(mb_convert_encoding($text, 'HTML-ENTITIES', "UTF-8")); var_dump(htmlentities($foo));
Output for 5.6.7 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(4) "🚁" Notice: Undefined variable: text in /in/vTHVj on line 10 string(0) "" string(4) "🚁"
Output for 5.4.0 - 5.5.35
string(8) "🚁" Notice: Undefined variable: text in /in/vTHVj on line 10 string(0) "" string(11) "&eth;Ÿš"
Output for 5.0.4 - 5.3.29
string(8) "🚁" Notice: Undefined variable: text in /in/vTHVj on line 10 string(0) "" string(37) "&Atilde;&deg;&Acirc;�&Acirc;�&Acirc;�"
Output for 4.3.4 - 5.0.3
string(8) "🚁" Notice: Undefined variable: text in /in/vTHVj on line 10 string(0) "" string(37) "&Atilde;&deg;&Acirc;�&Acirc;�&Acirc;�"
Output for 4.3.0 - 4.3.3
string(8) "🚁" Notice: Undefined variable: text in /in/vTHVj on line 10 bool(false) string(37) "&Atilde;&deg;&Acirc;�&Acirc;�&Acirc;�"