3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function Translate($word,$conversion = 'hi_to_en') { $word = urlencode($word); $arr_langs = explode('_to_', $conversion); $url = "http://translate.google.com/translate_a/t?client=t&text=$word&hl=".$arr_langs[1]."&sl=".$arr_langs[0]."&tl=".$arr_langs[1]."&ie=UTF-8&oe=UTF-8&multires=1&otf=1&pc=1&trs=1&ssel=3&tsel=6&sc=1"; $name_en = curl($url); $name_en = explode('"',$name_en); return $name_en[1]; } echo Translate("Hello");
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function curl() in /in/4CHTU:9 Stack trace: #0 /in/4CHTU(14): Translate('Hello') #1 {main} thrown in /in/4CHTU on line 9
Process exited with code 255.
Output for hhvm-3.12.0
Fatal error: Uncaught Error: Call to undefined function curl() in /in/4CHTU:9 Stack trace: #0 /in/4CHTU(14): Translate() #1 {main}
Process exited with code 255.
Output for 5.0.0 - 5.6.28, hhvm-3.10.0
Fatal error: Call to undefined function curl() in /in/4CHTU on line 9
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: curl() in /in/4CHTU on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: curl() in /in/4CHTU on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: curl() in /in/4CHTU on line 9