3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!function_exists('gravatar')) { function gravatar($user_id = false, $secure = false, $force = false) { // $CI =& get_instance(); $endpoint = 'http://gravatar.com/'; $secure_endpoint = 'https://secure.gravatar.com/'; $fallback = gravatar('00000000000000000000000000000000', false, true); $params = array( 's' => '250', // size 'd' => urlencode($fallback), // default (fallback) ); if (!$force) { if (!$user_id) { return $fallback; } } else { $params['f'] = 'y'; } // $email = $CI->members_model->gravatarEmail($user_id); $email = md5('test@example.com'); return ($secure ? $secure_endpoint : $endpoint) . 'avatar/' . $email . '?' . http_build_query($params); } } echo gravatar('00000000000000000000000000000000', true);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/S4h06
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'gravatar'
          2        DO_ICALL                                         $0      
          3        BOOL_NOT                                         ~1      $0
          4      > JMPZ                                                     ~1, ->6
    4     5    >   DECLARE_FUNCTION                                         'gravatar'
   33     6    >   INIT_FCALL_BY_NAME                                       'gravatar'
          7        SEND_VAL_EX                                              '00000000000000000000000000000000'
          8        SEND_VAL_EX                                              <true>
          9        DO_FCALL                                      0  $2      
         10        ECHO                                                     $2
         11      > RETURN                                                   1

Function %00gravatar%2Fin%2FS4h06%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
Branch analysis from position: 32
filename:       /in/S4h06
function name:  gravatar
number of ops:  42
compiled vars:  !0 = $user_id, !1 = $secure, !2 = $force, !3 = $endpoint, !4 = $secure_endpoint, !5 = $fallback, !6 = $params, !7 = $email
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      <false>
          1        RECV_INIT                                        !1      <false>
          2        RECV_INIT                                        !2      <false>
    8     3        ASSIGN                                                   !3, 'http%3A%2F%2Fgravatar.com%2F'
    9     4        ASSIGN                                                   !4, 'https%3A%2F%2Fsecure.gravatar.com%2F'
   10     5        INIT_FCALL_BY_NAME                                       'gravatar'
          6        SEND_VAL_EX                                              '00000000000000000000000000000000'
          7        SEND_VAL_EX                                              <false>
          8        SEND_VAL_EX                                              <true>
          9        DO_FCALL                                      0  $10     
         10        ASSIGN                                                   !5, $10
   13    11        INIT_ARRAY                                       ~12     '250', 's'
   14    12        INIT_FCALL                                               'urlencode'
         13        SEND_VAR                                                 !5
         14        DO_ICALL                                         $13     
         15        ADD_ARRAY_ELEMENT                                ~12     $13, 'd'
   12    16        ASSIGN                                                   !6, ~12
   17    17        BOOL_NOT                                         ~15     !2
         18      > JMPZ                                                     ~15, ->23
   18    19    >   BOOL_NOT                                         ~16     !0
         20      > JMPZ                                                     ~16, ->22
   19    21    > > RETURN                                                   !5
         22    > > JMP                                                      ->25
   22    23    >   ASSIGN_DIM                                               !6, 'f'
         24        OP_DATA                                                  'y'
   26    25    >   INIT_FCALL                                               'md5'
         26        SEND_VAL                                                 'test%40example.com'
         27        DO_ICALL                                         $18     
         28        ASSIGN                                                   !7, $18
   28    29      > JMPZ                                                     !1, ->32
         30    >   QM_ASSIGN                                        ~20     !4
         31      > JMP                                                      ->33
         32    >   QM_ASSIGN                                        ~20     !3
         33    >   CONCAT                                           ~21     ~20, 'avatar%2F'
         34        CONCAT                                           ~22     ~21, !7
         35        CONCAT                                           ~23     ~22, '%3F'
         36        INIT_FCALL                                               'http_build_query'
         37        SEND_VAR                                                 !6
         38        DO_ICALL                                         $24     
         39        CONCAT                                           ~25     ~23, $24
         40      > RETURN                                                   ~25
   29    41*     > RETURN                                                   null

End of function %00gravatar%2Fin%2FS4h06%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.62 ms | 1400 KiB | 21 Q