3v4l.org

run code in 300+ PHP versions simultaneously
<?php $matrix = array(); $matrix[1] = array( 0 => 65.70, 1 => 'Coles', 2 => '34 days', 3 => 14 ); $matstring=implode(",",$matrix[1]); print "INSERT INTO Australia (Price, Company, Days, Weight) VALUES ('$matstring')"; print "\n"; $id = NULL; $id = (is_null($id)) ? 'NULL' : '$id' ; $table = 'atable'; $values = array('one','two','three','four','five'); $valstring=implode("','",$values); print "INSERT INTO " . $table . " VALUES ($id,'$valstring')"; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EohJp
function name:  (null)
number of ops:  37
compiled vars:  !0 = $matrix, !1 = $matstring, !2 = $id, !3 = $table, !4 = $values, !5 = $valstring
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !0, 1
          2        OP_DATA                                                  <array>
    6     3        INIT_FCALL                                               'implode'
          4        SEND_VAL                                                 '%2C'
          5        FETCH_DIM_R                                      ~8      !0, 1
          6        SEND_VAL                                                 ~8
          7        DO_ICALL                                         $9      
          8        ASSIGN                                                   !1, $9
    8     9        ROPE_INIT                                     3  ~12     'INSERT+INTO+Australia+%28Price%2C+Company%2C+Days%2C+Weight%29+VALUES+%28%27'
         10        ROPE_ADD                                      1  ~12     ~12, !1
         11        ROPE_END                                      2  ~11     ~12, '%27%29'
         12        ECHO                                                     ~11
   10    13        ECHO                                                     '%0A'
   12    14        ASSIGN                                                   !2, null
   14    15        TYPE_CHECK                                    2          !2
         16      > JMPZ                                                     ~15, ->19
         17    >   QM_ASSIGN                                        ~16     'NULL'
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~16     '%24id'
         20    >   ASSIGN                                                   !2, ~16
   16    21        ASSIGN                                                   !3, 'atable'
   17    22        ASSIGN                                                   !4, <array>
   19    23        INIT_FCALL                                               'implode'
         24        SEND_VAL                                                 '%27%2C%27'
         25        SEND_VAR                                                 !4
         26        DO_ICALL                                         $20     
         27        ASSIGN                                                   !5, $20
   21    28        CONCAT                                           ~22     'INSERT+INTO+', !3
   22    29        ROPE_INIT                                     5  ~24     '+VALUES+%28'
         30        ROPE_ADD                                      1  ~24     ~24, !2
         31        ROPE_ADD                                      2  ~24     ~24, '%2C%27'
         32        ROPE_ADD                                      3  ~24     ~24, !5
         33        ROPE_END                                      4  ~23     ~24, '%27%29'
         34        CONCAT                                           ~27     ~22, ~23
         35        ECHO                                                     ~27
   25    36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.98 ms | 1396 KiB | 15 Q