3v4l.org

run code in 300+ PHP versions simultaneously
<?php $id =1; $SocialHandle = "Facebook,Twitter,LinkIn"; $SocialHandle = explode(",", $SocialHandle); $SociaUrl = "Url1,Url2,Url3"; $SociaUrl = explode(",", $SociaUrl); $sql = "INSERT INTO `social_table`(`id`, `social_handle`, `handle_url`) VALUES"; for ($i = 0; $i < count($SocialHandle); $i++) { $sql .= "($id, '$SocialHandle[$i]','$SociaUrl[$i]'),"; } $sql = rtrim($sql, ','); echo $sql;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 16
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 16
Branch analysis from position: 30
Branch analysis from position: 16
filename:       /in/nQsGY
function name:  (null)
number of ops:  37
compiled vars:  !0 = $id, !1 = $SocialHandle, !2 = $SociaUrl, !3 = $sql, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    4     1        ASSIGN                                                   !1, 'Facebook%2CTwitter%2CLinkIn'
    5     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !1, $7
    6     7        ASSIGN                                                   !2, 'Url1%2CUrl2%2CUrl3'
    7     8        INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%2C'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !2, $10
    9    13        ASSIGN                                                   !3, 'INSERT+INTO+%60social_table%60%28%60id%60%2C+%60social_handle%60%2C+%60handle_url%60%29+VALUES'
   10    14        ASSIGN                                                   !4, 0
         15      > JMP                                                      ->27
   11    16    >   ROPE_INIT                                     7  ~17     '%28'
         17        ROPE_ADD                                      1  ~17     ~17, !0
         18        ROPE_ADD                                      2  ~17     ~17, '%2C+%27'
         19        FETCH_DIM_R                                      ~14     !1, !4
         20        ROPE_ADD                                      3  ~17     ~17, ~14
         21        ROPE_ADD                                      4  ~17     ~17, '%27%2C%27'
         22        FETCH_DIM_R                                      ~15     !2, !4
         23        ROPE_ADD                                      5  ~17     ~17, ~15
         24        ROPE_END                                      6  ~16     ~17, '%27%29%2C'
         25        ASSIGN_OP                                     8          !3, ~16
   10    26        PRE_INC                                                  !4
         27    >   COUNT                                            ~23     !1
         28        IS_SMALLER                                               !4, ~23
         29      > JMPNZ                                                    ~24, ->16
   15    30    >   INIT_FCALL                                               'rtrim'
         31        SEND_VAR                                                 !3
         32        SEND_VAL                                                 '%2C'
         33        DO_ICALL                                         $25     
         34        ASSIGN                                                   !3, $25
   16    35        ECHO                                                     !3
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.16 ms | 1396 KiB | 17 Q