3v4l.org

run code in 300+ PHP versions simultaneously
<?php $db = new mysqli("host", "user", "pw", "db"); if($db->connect_errno > 0) { die('Connection failed [' . $db->connect_error . ']'); } $result = $db->query("SELECT * FROM `users`"); while($row = $result->fetch_assoc()) { echo $row['id']; } $numRows = $result->num_rows; echo $numRows; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 19
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 19
Branch analysis from position: 25
Branch analysis from position: 19
filename:       /in/LRTAJ
function name:  (null)
number of ops:  29
compiled vars:  !0 = $db, !1 = $result, !2 = $row, !3 = $numRows
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'mysqli'
          1        SEND_VAL_EX                                              'host'
          2        SEND_VAL_EX                                              'user'
          3        SEND_VAL_EX                                              'pw'
          4        SEND_VAL_EX                                              'db'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $4
    4     7        FETCH_OBJ_R                                      ~7      !0, 'connect_errno'
          8        IS_SMALLER                                               0, ~7
          9      > JMPZ                                                     ~8, ->14
    5    10    >   FETCH_OBJ_R                                      ~9      !0, 'connect_error'
         11        CONCAT                                           ~10     'Connection+failed+%5B', ~9
         12        CONCAT                                           ~11     ~10, '%5D'
         13      > EXIT                                                     ~11
    8    14    >   INIT_METHOD_CALL                                         !0, 'query'
         15        SEND_VAL_EX                                              'SELECT+%2A+FROM+%60users%60'
         16        DO_FCALL                                      0  $12     
         17        ASSIGN                                                   !1, $12
    9    18      > JMP                                                      ->21
   10    19    >   FETCH_DIM_R                                      ~14     !2, 'id'
         20        ECHO                                                     ~14
    9    21    >   INIT_METHOD_CALL                                         !1, 'fetch_assoc'
         22        DO_FCALL                                      0  $15     
         23        ASSIGN                                           ~16     !2, $15
         24      > JMPNZ                                                    ~16, ->19
   13    25    >   FETCH_OBJ_R                                      ~17     !1, 'num_rows'
         26        ASSIGN                                                   !3, ~17
   14    27        ECHO                                                     !3
   15    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.76 ms | 1395 KiB | 13 Q