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); return ($secure ? $secure_endpoint : $endpoint) . 'avatar/' . $email . '?' . http_build_query($params); } } echo gravatar('00000000000000000000000000000000', false, 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/bC8qY
function name:  (null)
number of ops:  13
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'
   32     6    >   INIT_FCALL_BY_NAME                                       'gravatar'
          7        SEND_VAL_EX                                              '00000000000000000000000000000000'
          8        SEND_VAL_EX                                              <false>
          9        SEND_VAL_EX                                              <true>
         10        DO_FCALL                                      0  $2      
         11        ECHO                                                     $2
         12      > RETURN                                                   1

Function %00gravatar%2Fin%2FbC8qY%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 26
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 36
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 36
Branch analysis from position: 34
Branch analysis from position: 36
filename:       /in/bC8qY
function name:  gravatar
number of ops:  46
compiled vars:  !0 = $user_id, !1 = $secure, !2 = $force, !3 = $CI, !4 = $endpoint, !5 = $secure_endpoint, !6 = $fallback, !7 = $params, !8 = $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>
    6     3        INIT_FCALL_BY_NAME                                       'get_instance'
          4        DO_FCALL                                      0  $9      
          5        ASSIGN_REF                                               !3, $9
    8     6        ASSIGN                                                   !4, 'http%3A%2F%2Fgravatar.com%2F'
    9     7        ASSIGN                                                   !5, 'https%3A%2F%2Fsecure.gravatar.com%2F'
   10     8        INIT_FCALL_BY_NAME                                       'gravatar'
          9        SEND_VAL_EX                                              '00000000000000000000000000000000'
         10        SEND_VAL_EX                                              <false>
         11        SEND_VAL_EX                                              <true>
         12        DO_FCALL                                      0  $13     
         13        ASSIGN                                                   !6, $13
   13    14        INIT_ARRAY                                       ~15     '250', 's'
   14    15        INIT_FCALL                                               'urlencode'
         16        SEND_VAR                                                 !6
         17        DO_ICALL                                         $16     
         18        ADD_ARRAY_ELEMENT                                ~15     $16, 'd'
   12    19        ASSIGN                                                   !7, ~15
   17    20        BOOL_NOT                                         ~18     !2
         21      > JMPZ                                                     ~18, ->26
   18    22    >   BOOL_NOT                                         ~19     !0
         23      > JMPZ                                                     ~19, ->25
   19    24    > > RETURN                                                   !6
         25    > > JMP                                                      ->28
   22    26    >   ASSIGN_DIM                                               !7, 'f'
         27        OP_DATA                                                  'y'
   25    28    >   FETCH_OBJ_R                                      ~21     !3, 'members_model'
         29        INIT_METHOD_CALL                                         ~21, 'gravatarEmail'
         30        SEND_VAR_EX                                              !0
         31        DO_FCALL                                      0  $22     
         32        ASSIGN                                                   !8, $22
   27    33      > JMPZ                                                     !1, ->36
         34    >   QM_ASSIGN                                        ~24     !5
         35      > JMP                                                      ->37
         36    >   QM_ASSIGN                                        ~24     !4
         37    >   CONCAT                                           ~25     ~24, 'avatar%2F'
         38        CONCAT                                           ~26     ~25, !8
         39        CONCAT                                           ~27     ~26, '%3F'
         40        INIT_FCALL                                               'http_build_query'
         41        SEND_VAR                                                 !7
         42        DO_ICALL                                         $28     
         43        CONCAT                                           ~29     ~27, $28
         44      > RETURN                                                   ~29
   28    45*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.85 ms | 1400 KiB | 19 Q