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 = 31; $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 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8jPvO
function name:  (null)
number of ops:  38
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
   13    15        ASSIGN                                                   !2, 31
   14    16        TYPE_CHECK                                    2          !2
         17      > JMPZ                                                     ~16, ->20
         18    >   QM_ASSIGN                                        ~17     'NULL'
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~17     '%24id'
         21    >   ASSIGN                                                   !2, ~17
   16    22        ASSIGN                                                   !3, 'atable'
   17    23        ASSIGN                                                   !4, <array>
   19    24        INIT_FCALL                                               'implode'
         25        SEND_VAL                                                 '%27%2C%27'
         26        SEND_VAR                                                 !4
         27        DO_ICALL                                         $21     
         28        ASSIGN                                                   !5, $21
   21    29        CONCAT                                           ~23     'INSERT+INTO+', !3
   22    30        ROPE_INIT                                     5  ~25     '+VALUES+%28'
         31        ROPE_ADD                                      1  ~25     ~25, !2
         32        ROPE_ADD                                      2  ~25     ~25, '%2C%27'
         33        ROPE_ADD                                      3  ~25     ~25, !5
         34        ROPE_END                                      4  ~24     ~25, '%27%29'
         35        CONCAT                                           ~28     ~23, ~24
         36        ECHO                                                     ~28
   25    37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.88 ms | 1396 KiB | 15 Q