3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_likes_per_user($u_id, $force_db = false) { if ($this->memcache) { $u_id = intval($u_id); $key = 'liked_news_' . $u_id; $res = $this->memcache->get($key); if ($res != '') { $res = unserialize($res); } // This line causes a syntax error for no obvious reason if(!is_array($res) || $force_db){ $res = array(); $sql = "..."; $uu_query = $this->datenbank->query_result($sql); while ($row = $uu_query->fetch_row()) { $res[] = $row['uu_id']; } $this->memcache->set($key, serialize($res), 0, 3600); } return $res; } else { throw new Exception("Kein Memcache Objekt!"); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/buCdL
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E > > RETURN                                                   1

Function get_likes_per_user:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 55
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
2 jumps found. (Code = 47) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 53
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 35
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 35
Branch analysis from position: 42
Branch analysis from position: 35
Branch analysis from position: 53
Branch analysis from position: 25
Branch analysis from position: 21
Branch analysis from position: 55
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/buCdL
function name:  get_likes_per_user
number of ops:  60
compiled vars:  !0 = $u_id, !1 = $force_db, !2 = $key, !3 = $res, !4 = $sql, !5 = $uu_query, !6 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
    4     2        FETCH_THIS                                       $7      
          3        FETCH_OBJ_R                                      ~8      $7, 'memcache'
          4      > JMPZ                                                     ~8, ->55
    5     5    >   CAST                                          4  ~9      !0
          6        ASSIGN                                                   !0, ~9
    6     7        CONCAT                                           ~11     'liked_news_', !0
          8        ASSIGN                                                   !2, ~11
    7     9        FETCH_THIS                                       $13     
         10        FETCH_OBJ_R                                      ~14     $13, 'memcache'
         11        INIT_METHOD_CALL                                         ~14, 'get'
         12        SEND_VAR_EX                                              !2
         13        DO_FCALL                                      0  $15     
         14        ASSIGN                                                   !3, $15
    8    15        IS_NOT_EQUAL                                             !3, ''
         16      > JMPZ                                                     ~17, ->21
    9    17    >   INIT_FCALL                                               'unserialize'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                         $18     
         20        ASSIGN                                                   !3, $18
   12    21    >   TYPE_CHECK                                  128  ~20     !3
         22        BOOL_NOT                                         ~21     ~20
         23      > JMPNZ_EX                                         ~21     ~21, ->25
         24    >   BOOL                                             ~21     !1
         25    > > JMPZ                                                     ~21, ->53
   13    26    >   ASSIGN                                                   !3, <array>
   15    27        ASSIGN                                                   !4, '...'
   16    28        FETCH_THIS                                       $24     
         29        FETCH_OBJ_R                                      ~25     $24, 'datenbank'
         30        INIT_METHOD_CALL                                         ~25, 'query_result'
         31        SEND_VAR_EX                                              !4
         32        DO_FCALL                                      0  $26     
         33        ASSIGN                                                   !5, $26
   17    34      > JMP                                                      ->38
   18    35    >   FETCH_DIM_R                                      ~29     !6, 'uu_id'
         36        ASSIGN_DIM                                               !3
         37        OP_DATA                                                  ~29
   17    38    >   INIT_METHOD_CALL                                         !5, 'fetch_row'
         39        DO_FCALL                                      0  $30     
         40        ASSIGN                                           ~31     !6, $30
         41      > JMPNZ                                                    ~31, ->35
   20    42    >   FETCH_THIS                                       $32     
         43        FETCH_OBJ_R                                      ~33     $32, 'memcache'
         44        INIT_METHOD_CALL                                         ~33, 'set'
         45        SEND_VAR_EX                                              !2
         46        INIT_FCALL                                               'serialize'
         47        SEND_VAR                                                 !3
         48        DO_ICALL                                         $34     
         49        SEND_VAR_NO_REF_EX                                       $34
         50        SEND_VAL_EX                                              0
         51        SEND_VAL_EX                                              3600
         52        DO_FCALL                                      0          
   22    53    > > RETURN                                                   !3
         54*       JMP                                                      ->59
   24    55    >   NEW                                              $36     'Exception'
         56        SEND_VAL_EX                                              'Kein+Memcache+Objekt%21'
         57        DO_FCALL                                      0          
         58      > THROW                                         0          $36
   26    59*     > RETURN                                                   null

End of function get_likes_per_user

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.85 ms | 1400 KiB | 17 Q