3v4l.org

run code in 300+ PHP versions simultaneously
<? function get_menu() { $result = mysql_query("SELECT * FROM posts WHERE parent=0"); do { $res_array[$count] = $row; $count++; } while($row = mysql_fetch_array($result)); return $res_array; } function get_submenu($parent) { $result = mysql_query("SELECT * FROM posts WHERE parent=".$parent); do { error_reporting(0); $res_array[$count] = $row; $count++; } while($row = mysql_fetch_array($result)); return $res_array; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQTCl
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E > > RETURN                                                   1

Function get_menu:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 4
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/TQTCl
function name:  get_menu
number of ops:  14
compiled vars:  !0 = $result, !1 = $res_array, !2 = $count, !3 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'mysql_query'
          1        SEND_VAL_EX                                              'SELECT+%2A+FROM+posts+WHERE+parent%3D0'
          2        DO_FCALL                                      0  $4      
          3        ASSIGN                                                   !0, $4
    7     4    >   ASSIGN_DIM                                               !1, !2
          5        OP_DATA                                                  !3
    8     6        PRE_INC                                                  !2
   10     7        INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $8      
         10        ASSIGN                                           ~9      !3, $8
         11      > JMPNZ                                                    ~9, ->4
   11    12    > > RETURN                                                   !1
   12    13*     > RETURN                                                   null

End of function get_menu

Function get_submenu:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 6
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/TQTCl
function name:  get_submenu
number of ops:  19
compiled vars:  !0 = $parent, !1 = $result, !2 = $res_array, !3 = $count, !4 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        INIT_FCALL_BY_NAME                                       'mysql_query'
          2        CONCAT                                           ~5      'SELECT+%2A+FROM+posts+WHERE+parent%3D', !0
          3        SEND_VAL_EX                                              ~5
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !1, $6
   18     6    >   INIT_FCALL                                               'error_reporting'
          7        SEND_VAL                                                 0
          8        DO_ICALL                                                 
   19     9        ASSIGN_DIM                                               !2, !3
         10        OP_DATA                                                  !4
   20    11        PRE_INC                                                  !3
   22    12        INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0  $11     
         15        ASSIGN                                           ~12     !4, $11
         16      > JMPNZ                                                    ~12, ->6
   23    17    > > RETURN                                                   !2
   24    18*     > RETURN                                                   null

End of function get_submenu

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.82 ms | 1400 KiB | 15 Q