3v4l.org

run code in 300+ PHP versions simultaneously
<?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 = file_get_contents($url); $name_en = explode('"',$name_en); return $name_en[1]; } echo Translate("Hello");
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for translate.google.com failed: System error in /in/0VE1q on line 9 Warning: file_get_contents(http://translate.google.com/translate_a/t?client=t&text=Hello&hl=en&sl=hi&tl=en&ie=UTF-8&oe=UTF-8&multires=1&otf=1&pc=1&trs=1&ssel=3&tsel=6&sc=1): Failed to open stream: php_network_getaddresses: getaddrinfo for translate.google.com failed: System error in /in/0VE1q on line 9 Warning: Undefined array key 1 in /in/0VE1q on line 12

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
41.06 ms | 402 KiB | 8 Q