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 = 'http://www.gravatar.com/avatar/00000000000000000000000000000000?d=mm&f=y'; $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('0', true, false);
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/1NQMl
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'
   33     6    >   INIT_FCALL_BY_NAME                                       'gravatar'
          7        SEND_VAL_EX                                              '0'
          8        SEND_VAL_EX                                              <true>
          9        SEND_VAL_EX                                              <false>
         10        DO_FCALL                                      0  $2      
         11        ECHO                                                     $2
         12      > RETURN                                                   1

Function %00gravatar%2Fin%2F1NQMl%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
Branch analysis from position: 27
filename:       /in/1NQMl
function name:  gravatar
number of ops:  37
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        ASSIGN                                                   !5, 'http%3A%2F%2Fwww.gravatar.com%2Favatar%2F00000000000000000000000000000000%3Fd%3Dmm%26f%3Dy'
   13     6        INIT_ARRAY                                       ~11     '250', 's'
   14     7        INIT_FCALL                                               'urlencode'
          8        SEND_VAR                                                 !5
          9        DO_ICALL                                         $12     
         10        ADD_ARRAY_ELEMENT                                ~11     $12, 'd'
   12    11        ASSIGN                                                   !6, ~11
   17    12        BOOL_NOT                                         ~14     !2
         13      > JMPZ                                                     ~14, ->18
   18    14    >   BOOL_NOT                                         ~15     !0
         15      > JMPZ                                                     ~15, ->17
   19    16    > > RETURN                                                   !5
         17    > > JMP                                                      ->20
   22    18    >   ASSIGN_DIM                                               !6, 'f'
         19        OP_DATA                                                  'y'
   26    20    >   INIT_FCALL                                               'md5'
         21        SEND_VAL                                                 'test%40example.com'
         22        DO_ICALL                                         $17     
         23        ASSIGN                                                   !7, $17
   28    24      > JMPZ                                                     !1, ->27
         25    >   QM_ASSIGN                                        ~19     !4
         26      > JMP                                                      ->28
         27    >   QM_ASSIGN                                        ~19     !3
         28    >   CONCAT                                           ~20     ~19, 'avatar%2F'
         29        CONCAT                                           ~21     ~20, !7
         30        CONCAT                                           ~22     ~21, '%3F'
         31        INIT_FCALL                                               'http_build_query'
         32        SEND_VAR                                                 !6
         33        DO_ICALL                                         $23     
         34        CONCAT                                           ~24     ~22, $23
         35      > RETURN                                                   ~24
   29    36*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.91 ms | 1400 KiB | 21 Q