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/ULWdL
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%2FULWdL%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 = 18
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/ULWdL
function name:  gravatar
number of ops:  35
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                                                      ->18
   26    18    >   INIT_FCALL                                               'md5'
         19        SEND_VAL                                                 'test%40example.com'
         20        DO_ICALL                                         $16     
         21        ASSIGN                                                   !7, $16
   28    22      > JMPZ                                                     !1, ->25
         23    >   QM_ASSIGN                                        ~18     !4
         24      > JMP                                                      ->26
         25    >   QM_ASSIGN                                        ~18     !3
         26    >   CONCAT                                           ~19     ~18, 'avatar%2F'
         27        CONCAT                                           ~20     ~19, !7
         28        CONCAT                                           ~21     ~20, '%3F'
         29        INIT_FCALL                                               'http_build_query'
         30        SEND_VAR                                                 !6
         31        DO_ICALL                                         $22     
         32        CONCAT                                           ~23     ~21, $22
         33      > RETURN                                                   ~23
   29    34*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.26 ms | 1405 KiB | 21 Q