3v4l.org

run code in 300+ PHP versions simultaneously
<?php $parameters=array(); $parameters[0] = 'UPDATE applications SET service=?,acronym=?,email=? WHERE id=2'; $parameters[1] = '"value1","value2","value3"'; $query = array_shift($parameters); $parameter_array = explode(",",$parameters[0]); foreach ($parameter_array as $key => $a_parameter) { $parameter_array[$key] = trim($a_parameter, '"'); } //$statement = $db->prepare($query); echo "The query is:".$query."\n"; //try // { // $statement->execute($parameter_array); print_r($parameter_array); // } //catch (PDOException $error) //{ // echo $error -> getMessage(); //} ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 25
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 25
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/7WHSl
function name:  (null)
number of ops:  33
compiled vars:  !0 = $parameters, !1 = $query, !2 = $parameter_array, !3 = $a_parameter, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN_DIM                                               !0, 0
          2        OP_DATA                                                  'UPDATE+applications+SET+service%3D%3F%2Cacronym%3D%3F%2Cemail%3D%3F+WHERE+id%3D2'
   10     3        ASSIGN_DIM                                               !0, 1
          4        OP_DATA                                                  '%22value1%22%2C%22value2%22%2C%22value3%22'
   12     5        INIT_FCALL                                               'array_shift'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !1, $8
   14     9        INIT_FCALL                                               'explode'
         10        SEND_VAL                                                 '%2C'
         11        FETCH_DIM_R                                      ~10     !0, 0
         12        SEND_VAL                                                 ~10
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !2, $11
   16    15      > FE_RESET_R                                       $13     !2, ->25
         16    > > FE_FETCH_R                                       ~14     $13, !3, ->25
         17    >   ASSIGN                                                   !4, ~14
   18    18        INIT_FCALL                                               'trim'
         19        SEND_VAR                                                 !3
         20        SEND_VAL                                                 '%22'
         21        DO_ICALL                                         $17     
         22        ASSIGN_DIM                                               !2, !4
         23        OP_DATA                                                  $17
   16    24      > JMP                                                      ->16
         25    >   FE_FREE                                                  $13
   22    26        CONCAT                                           ~18     'The+query+is%3A', !1
         27        CONCAT                                           ~19     ~18, '%0A'
         28        ECHO                                                     ~19
   27    29        INIT_FCALL                                               'print_r'
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                                 
   35    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.91 ms | 942 KiB | 22 Q