3v4l.org

run code in 300+ PHP versions simultaneously
<?php $commaValues = '5773270,5778216'; $lubuvnaCommas = explode(',', $commaValues); $destinations = ''; foreach($lubuvnaCommas as $row){ // Concatenate current value with previous ones $destinations .= "<cl_id>".$row."</cl_id>"; } $xml =' <?xml version="1.0" encoding="UTF-8"?> <destinations> '.$destinations.' </destinations>'; echo $xml;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/V6EMA
function name:  (null)
number of ops:  19
compiled vars:  !0 = $commaValues, !1 = $lubuvnaCommas, !2 = $destinations, !3 = $row, !4 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '5773270%2C5778216'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    5     6        ASSIGN                                                   !2, ''
    7     7      > FE_RESET_R                                       $9      !1, ->13
          8    > > FE_FETCH_R                                               $9, !3, ->13
    9     9    >   CONCAT                                           ~10     '%3Ccl_id%3E', !3
         10        CONCAT                                           ~11     ~10, '%3C%2Fcl_id%3E'
         11        ASSIGN_OP                                     8          !2, ~11
    7    12      > JMP                                                      ->8
         13    >   FE_FREE                                                  $9
   15    14        CONCAT                                           ~13     '%0A+++%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A+++%3Cdestinations%3E%0A+++', !2
         15        CONCAT                                           ~14     ~13, '%0A+++%3C%2Fdestinations%3E'
   12    16        ASSIGN                                                   !4, ~14
   18    17        ECHO                                                     !4
   19    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.01 ms | 1399 KiB | 15 Q