3v4l.org

run code in 300+ PHP versions simultaneously
<?php $con=mysqli_connect("db4free.net","thesis","tribiana7584913","library"); $con=mysqli_connect("db4free.net","thesis","tribiana7584913","library"); $date = $_POST["date"]; $accession = $_POST["accession"]; $statement = mysqli_prepare($con, "SELECT Acces_no FROM book_tbl where Acces_no= ? "); mysqli_stmt_bind_param($statement, "s", $accession); mysqli_stmt_execute($statement); mysqli_stmt_store_result($statement); mysqli_stmt_bind_result($statement,$accession); if(mysqli_stmt_fetch($statement)){ $Inventory= $accession; echo json_encode($Inventory); } if($rs = $statement){ $statement = mysqli_prepare($con, "INSERT INTO inventory_tbl (inv_date,Acces_no) VALUES (?,?)"); mysqli_stmt_bind_param($statement, "ss",$date,$accession); mysqli_stmt_execute($statement); mysqli_stmt_close($statement); mysqli_close($con); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 49
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 71
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 71
Branch analysis from position: 49
filename:       /in/rgtkD
function name:  (null)
number of ops:  72
compiled vars:  !0 = $con, !1 = $date, !2 = $accession, !3 = $statement, !4 = $Inventory, !5 = $rs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'mysqli_connect'
          1        SEND_VAL_EX                                              'db4free.net'
          2        SEND_VAL_EX                                              'thesis'
          3        SEND_VAL_EX                                              'tribiana7584913'
          4        SEND_VAL_EX                                              'library'
          5        DO_FCALL                                      0  $6      
          6        ASSIGN                                                   !0, $6
    4     7        INIT_FCALL_BY_NAME                                       'mysqli_connect'
          8        SEND_VAL_EX                                              'db4free.net'
          9        SEND_VAL_EX                                              'thesis'
         10        SEND_VAL_EX                                              'tribiana7584913'
         11        SEND_VAL_EX                                              'library'
         12        DO_FCALL                                      0  $8      
         13        ASSIGN                                                   !0, $8
    5    14        FETCH_R                      global              ~10     '_POST'
         15        FETCH_DIM_R                                      ~11     ~10, 'date'
         16        ASSIGN                                                   !1, ~11
    6    17        FETCH_R                      global              ~13     '_POST'
         18        FETCH_DIM_R                                      ~14     ~13, 'accession'
         19        ASSIGN                                                   !2, ~14
    8    20        INIT_FCALL_BY_NAME                                       'mysqli_prepare'
         21        SEND_VAR_EX                                              !0
         22        SEND_VAL_EX                                              'SELECT+Acces_no+FROM+book_tbl+where+Acces_no%3D+%3F+'
         23        DO_FCALL                                      0  $16     
         24        ASSIGN                                                   !3, $16
    9    25        INIT_FCALL_BY_NAME                                       'mysqli_stmt_bind_param'
         26        SEND_VAR_EX                                              !3
         27        SEND_VAL_EX                                              's'
         28        SEND_VAR_EX                                              !2
         29        DO_FCALL                                      0          
   10    30        INIT_FCALL_BY_NAME                                       'mysqli_stmt_execute'
         31        SEND_VAR_EX                                              !3
         32        DO_FCALL                                      0          
   13    33        INIT_FCALL_BY_NAME                                       'mysqli_stmt_store_result'
         34        SEND_VAR_EX                                              !3
         35        DO_FCALL                                      0          
   14    36        INIT_FCALL_BY_NAME                                       'mysqli_stmt_bind_result'
         37        SEND_VAR_EX                                              !3
         38        SEND_VAR_EX                                              !2
         39        DO_FCALL                                      0          
   18    40        INIT_FCALL_BY_NAME                                       'mysqli_stmt_fetch'
         41        SEND_VAR_EX                                              !3
         42        DO_FCALL                                      0  $22     
         43      > JMPZ                                                     $22, ->49
   19    44    >   ASSIGN                                                   !4, !2
   20    45        INIT_FCALL                                               'json_encode'
         46        SEND_VAR                                                 !4
         47        DO_ICALL                                         $24     
         48        ECHO                                                     $24
   25    49    >   ASSIGN                                           ~25     !5, !3
         50      > JMPZ                                                     ~25, ->71
   28    51    >   INIT_FCALL_BY_NAME                                       'mysqli_prepare'
         52        SEND_VAR_EX                                              !0
         53        SEND_VAL_EX                                              'INSERT+INTO+inventory_tbl+%28inv_date%2CAcces_no%29+VALUES+%28%3F%2C%3F%29'
         54        DO_FCALL                                      0  $26     
         55        ASSIGN                                                   !3, $26
   29    56        INIT_FCALL_BY_NAME                                       'mysqli_stmt_bind_param'
         57        SEND_VAR_EX                                              !3
         58        SEND_VAL_EX                                              'ss'
         59        SEND_VAR_EX                                              !1
         60        SEND_VAR_EX                                              !2
         61        DO_FCALL                                      0          
   30    62        INIT_FCALL_BY_NAME                                       'mysqli_stmt_execute'
         63        SEND_VAR_EX                                              !3
         64        DO_FCALL                                      0          
   32    65        INIT_FCALL_BY_NAME                                       'mysqli_stmt_close'
         66        SEND_VAR_EX                                              !3
         67        DO_FCALL                                      0          
   34    68        INIT_FCALL_BY_NAME                                       'mysqli_close'
         69        SEND_VAR_EX                                              !0
         70        DO_FCALL                                      0          
   37    71    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.63 ms | 1400 KiB | 15 Q