3v4l.org

run code in 300+ PHP versions simultaneously
<?php // array containing data $array = array( "name" => "John", "surname" => "Doe", "email" => "j.doe@intelligence.gov" ); // build query... $sql = "INSERT INTO table"; // implode keys of $array... $sql .= " (`".implode("`, `", array_keys($array))."`)"; // implode values of $array... $sql .= " VALUES ('".implode("', '", $array)."') "; // execute query... $result = mysql_query($sql) or die(mysql_error());
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/procb
function name:  (null)
number of ops:  29
compiled vars:  !0 = $array, !1 = $sql, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, 'INSERT+INTO+table'
   14     2        INIT_FCALL                                               'implode'
          3        SEND_VAL                                                 '%60%2C+%60'
          4        INIT_FCALL                                               'array_keys'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                         $6      
          9        CONCAT                                           ~7      '+%28%60', $6
         10        CONCAT                                           ~8      ~7, '%60%29'
         11        ASSIGN_OP                                     8          !1, ~8
   17    12        INIT_FCALL                                               'implode'
         13        SEND_VAL                                                 '%27%2C+%27'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $10     
         16        CONCAT                                           ~11     '+VALUES+%28%27', $10
         17        CONCAT                                           ~12     ~11, '%27%29+'
         18        ASSIGN_OP                                     8          !1, ~12
   20    19        INIT_FCALL_BY_NAME                                       'mysql_query'
         20        SEND_VAR_EX                                              !1
         21        DO_FCALL                                      0  $14     
         22        ASSIGN                                           ~15     !2, $14
         23      > JMPNZ_EX                                         ~15     ~15, ->28
         24    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         25        DO_FCALL                                      0  $16     
         26      > EXIT                                                     $16
         27*       BOOL                                             ~15     <true>
         28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.57 ms | 1395 KiB | 17 Q