3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.28 ms | 1400 KiB | 15 Q