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 = curl($url); $name_en = explode('"',$name_en); return $name_en[1]; } echo Translate("Hello");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4CHTU
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'translate'
          1        SEND_VAL                                                 'Hello'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function translate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4CHTU
function name:  Translate
number of ops:  36
compiled vars:  !0 = $word, !1 = $conversion, !2 = $arr_langs, !3 = $url, !4 = $name_en
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      'hi_to_en'
    5     2        INIT_FCALL                                               'urlencode'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !0, $5
    6     6        INIT_FCALL                                               'explode'
          7        SEND_VAL                                                 '_to_'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
    7    11        ROPE_INIT                                     3  ~10     'http%3A%2F%2Ftranslate.google.com%2Ftranslate_a%2Ft%3Fclient%3Dt%26text%3D'
         12        ROPE_ADD                                      1  ~10     ~10, !0
         13        ROPE_END                                      2  ~9      ~10, '%26hl%3D'
         14        FETCH_DIM_R                                      ~12     !2, 1
         15        CONCAT                                           ~13     ~9, ~12
         16        CONCAT                                           ~14     ~13, '%26sl%3D'
         17        FETCH_DIM_R                                      ~15     !2, 0
         18        CONCAT                                           ~16     ~14, ~15
         19        CONCAT                                           ~17     ~16, '%26tl%3D'
         20        FETCH_DIM_R                                      ~18     !2, 1
         21        CONCAT                                           ~19     ~17, ~18
         22        CONCAT                                           ~20     ~19, '%26ie%3DUTF-8%26oe%3DUTF-8%26multires%3D1%26otf%3D1%26pc%3D1%26trs%3D1%26ssel%3D3%26tsel%3D6%26sc%3D1'
         23        ASSIGN                                                   !3, ~20
    9    24        INIT_FCALL_BY_NAME                                       'curl'
         25        SEND_VAR_EX                                              !3
         26        DO_FCALL                                      0  $22     
         27        ASSIGN                                                   !4, $22
   11    28        INIT_FCALL                                               'explode'
         29        SEND_VAL                                                 '%22'
         30        SEND_VAR                                                 !4
         31        DO_ICALL                                         $24     
         32        ASSIGN                                                   !4, $24
   12    33        FETCH_DIM_R                                      ~26     !4, 1
         34      > RETURN                                                   ~26
   13    35*     > RETURN                                                   null

End of function translate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.67 ms | 1403 KiB | 18 Q