3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = 'foo'; ?> <?php class MyDB extends SQLite3 { function __construct() { $this->open('/home/oegget/hacking/rozze.db'); } } $db = new MyDB(); if(!$db){ echo $db->lastErrorMsg(); } else { echo "Opened database successfully\n"; } $sql =<<<EOF SELECT * from egget; EOF; $ret = $db->query($sql); while($row = $ret->fetchArray(SQLITE3_ASSOC) ){ echo "IMDB = ". $row['imdb'] . "<br>"; echo "NAME = ". $row['title'] ."<br><br>"; print "foo is $username"; } echo "Operation done successfully\n"; $db->close(); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 17
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 17
Branch analysis from position: 33
Branch analysis from position: 17
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
filename:       /in/MvFhP
function name:  (null)
number of ops:  37
compiled vars:  !0 = $username, !1 = $db, !2 = $sql, !3 = $ret, !4 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo'
   14     1        NEW                                              $6      'MyDB'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
   15     4        BOOL_NOT                                         ~9      !1
          5      > JMPZ                                                     ~9, ->10
   16     6    >   INIT_METHOD_CALL                                         !1, 'lastErrorMsg'
          7        DO_FCALL                                      0  $10     
          8        ECHO                                                     $10
   15     9      > JMP                                                      ->11
   18    10    >   ECHO                                                     'Opened+database+successfully%0A'
   21    11    >   ASSIGN                                                   !2, '++++++SELECT+%2A+from+egget%3B'
   25    12        INIT_METHOD_CALL                                         !1, 'query'
         13        SEND_VAR_EX                                              !2
         14        DO_FCALL                                      0  $12     
         15        ASSIGN                                                   !3, $12
   26    16      > JMP                                                      ->28
   27    17    >   FETCH_DIM_R                                      ~14     !4, 'imdb'
         18        CONCAT                                           ~15     'IMDB+%3D+', ~14
         19        CONCAT                                           ~16     ~15, '%3Cbr%3E'
         20        ECHO                                                     ~16
   28    21        FETCH_DIM_R                                      ~17     !4, 'title'
         22        CONCAT                                           ~18     'NAME+%3D+', ~17
         23        CONCAT                                           ~19     ~18, '%3Cbr%3E%3Cbr%3E'
         24        ECHO                                                     ~19
   29    25        NOP                                                      
         26        FAST_CONCAT                                      ~20     'foo+is+', !0
         27        ECHO                                                     ~20
   26    28    >   INIT_METHOD_CALL                                         !3, 'fetchArray'
         29        SEND_VAL_EX                                              1
         30        DO_FCALL                                      0  $21     
         31        ASSIGN                                           ~22     !4, $21
         32      > JMPNZ                                                    ~22, ->17
   31    33    >   ECHO                                                     'Operation+done+successfully%0A'
   32    34        INIT_METHOD_CALL                                         !1, 'close'
         35        DO_FCALL                                      0          
   33    36      > RETURN                                                   1

Class MyDB:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MvFhP
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_METHOD_CALL                                         'open'
          1        SEND_VAL_EX                                              '%2Fhome%2Foegget%2Fhacking%2Frozze.db'
          2        DO_FCALL                                      0          
   12     3      > RETURN                                                   null

End of function __construct

End of class MyDB.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.76 ms | 1012 KiB | 13 Q