3v4l.org

run code in 300+ PHP versions simultaneously
<?php function Translate($word, $conversion = 'es_to_fr') { $word = urlencode($word); $arr_langs = explode('_to_', $conversion); $url = sprintf('http://translate.google.com/translate_a/t?client=t&text=%s&hl=%s&sl=s&tl=%s&ie=UTF-8&oe=UTF-8&multires=1&otf=1&pc=1&trs=1&ssel=3&tsel=6&sc=1', $word, $arr_langs[1], $arr_langs[0], $arr_langs[1]); $name_fr = curl($url); $name_fr = explode('"', $name_fr); return $name_fr[1]; } echo Translate("fiordo");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DXivm
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'translate'
          1        SEND_VAL                                                 'fiordo'
          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/DXivm
function name:  Translate
number of ops:  34
compiled vars:  !0 = $word, !1 = $conversion, !2 = $arr_langs, !3 = $url, !4 = $name_fr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      'es_to_fr'
    4     2        INIT_FCALL                                               'urlencode'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !0, $5
    5     6        INIT_FCALL                                               'explode'
          7        SEND_VAL                                                 '_to_'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
    8    11        INIT_FCALL                                               'sprintf'
         12        SEND_VAL                                                 'http%3A%2F%2Ftranslate.google.com%2Ftranslate_a%2Ft%3Fclient%3Dt%26text%3D%25s%26hl%3D%25s%26sl%3Ds%26tl%3D%25s%26ie%3DUTF-8%26oe%3DUTF-8%26multires%3D1%26otf%3D1%26pc%3D1%26trs%3D1%26ssel%3D3%26tsel%3D6%26sc%3D1'
         13        SEND_VAR                                                 !0
         14        FETCH_DIM_R                                      ~9      !2, 1
         15        SEND_VAL                                                 ~9
         16        FETCH_DIM_R                                      ~10     !2, 0
         17        SEND_VAL                                                 ~10
         18        FETCH_DIM_R                                      ~11     !2, 1
         19        SEND_VAL                                                 ~11
         20        DO_ICALL                                         $12     
    6    21        ASSIGN                                                   !3, $12
    9    22        INIT_FCALL_BY_NAME                                       'curl'
         23        SEND_VAR_EX                                              !3
         24        DO_FCALL                                      0  $14     
         25        ASSIGN                                                   !4, $14
   11    26        INIT_FCALL                                               'explode'
         27        SEND_VAL                                                 '%22'
         28        SEND_VAR                                                 !4
         29        DO_ICALL                                         $16     
         30        ASSIGN                                                   !4, $16
   13    31        FETCH_DIM_R                                      ~18     !4, 1
         32      > RETURN                                                   ~18
   14    33*     > RETURN                                                   null

End of function translate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.3 ms | 1403 KiB | 20 Q