3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _CC($amt,$from=''){ global $CURRENCY; if($CURRENCY['conv']===1){ $from=(!empty($from) ? $from : 'USD'); if(empty($CURRENCY[$from])){ $c=file_get_contents('http://www.google.com/ig/calculator?hl=en&q=1'.$from.'=?'.LOCAL_CURRENCY); $j=json_decode(preg_replace('/({|,)([a-z]+): /','$1"$2": ',$c)); preg_match('/\d+(?:\.\d+)?/',$j->{'rhs'},$res); $CURRENCY[$from] = $res[0]; } return bcmul($amt,$CURRENCY[$from],2); }else{ return $amt; } } _CC('1.11');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8Epu9
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               '_cc'
          1        SEND_VAL                                                 '1.11'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function _cc:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 50
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 41
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 41
Branch analysis from position: 15
Branch analysis from position: 41
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8Epu9
function name:  _CC
number of ops:  52
compiled vars:  !0 = $amt, !1 = $from, !2 = $CURRENCY, !3 = $c, !4 = $j, !5 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      ''
    3     2        BIND_GLOBAL                                              !2, 'CURRENCY'
    4     3        FETCH_DIM_R                                      ~6      !2, 'conv'
          4        IS_IDENTICAL                                             ~6, 1
          5      > JMPZ                                                     ~7, ->50
    5     6    >   ISSET_ISEMPTY_CV                                 ~8      !1
          7        BOOL_NOT                                         ~9      ~8
          8      > JMPZ                                                     ~9, ->11
          9    >   QM_ASSIGN                                        ~10     !1
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~10     'USD'
         12    >   ASSIGN                                                   !1, ~10
    6    13        ISSET_ISEMPTY_DIM_OBJ                         1          !2, !1
         14      > JMPZ                                                     ~12, ->41
    7    15    >   INIT_FCALL                                               'file_get_contents'
         16        CONCAT                                           ~13     'http%3A%2F%2Fwww.google.com%2Fig%2Fcalculator%3Fhl%3Den%26q%3D1', !1
         17        CONCAT                                           ~14     ~13, '%3D%3F'
         18        FETCH_CONSTANT                                   ~15     'LOCAL_CURRENCY'
         19        CONCAT                                           ~16     ~14, ~15
         20        SEND_VAL                                                 ~16
         21        DO_ICALL                                         $17     
         22        ASSIGN                                                   !3, $17
    8    23        INIT_FCALL                                               'json_decode'
         24        INIT_FCALL                                               'preg_replace'
         25        SEND_VAL                                                 '%2F%28%7B%7C%2C%29%28%5Ba-z%5D%2B%29%3A+%2F'
         26        SEND_VAL                                                 '%241%22%242%22%3A+'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                         $19     
         29        SEND_VAR                                                 $19
         30        DO_ICALL                                         $20     
         31        ASSIGN                                                   !4, $20
    9    32        INIT_FCALL                                               'preg_match'
         33        SEND_VAL                                                 '%2F%5Cd%2B%28%3F%3A%5C.%5Cd%2B%29%3F%2F'
         34        FETCH_OBJ_R                                      ~22     !4, 'rhs'
         35        SEND_VAL                                                 ~22
         36        SEND_REF                                                 !5
         37        DO_ICALL                                                 
   10    38        FETCH_DIM_R                                      ~25     !5, 0
         39        ASSIGN_DIM                                               !2, !1
         40        OP_DATA                                                  ~25
   12    41    >   INIT_FCALL_BY_NAME                                       'bcmul'
         42        SEND_VAR_EX                                              !0
         43        CHECK_FUNC_ARG                                           
         44        FETCH_DIM_FUNC_ARG                               $26     !2, !1
         45        SEND_FUNC_ARG                                            $26
         46        SEND_VAL_EX                                              2
         47        DO_FCALL                                      0  $27     
         48      > RETURN                                                   $27
         49*       JMP                                                      ->51
   14    50    > > RETURN                                                   !0
   16    51*     > RETURN                                                   null

End of function _cc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.8 ms | 1403 KiB | 25 Q