3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('lastname', 'email', 'phone'); $comma_separated = implode("','", $array); $final_output = '[' . $comma_separated . ']'; echo $comma_separated; // lastname,email,phone echo '<br />'; echo $final_output; echo '<br />'; $newArray = explode(",", $comma_separated); foreach ($newArray as $i){ echo $i; echo '<br />'; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/6gWH2
function name:  (null)
number of ops:  25
compiled vars:  !0 = $array, !1 = $comma_separated, !2 = $final_output, !3 = $newArray, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%27%2C%27'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    5     6        CONCAT                                           ~8      '%5B', !1
          7        CONCAT                                           ~9      ~8, '%5D'
          8        ASSIGN                                                   !2, ~9
    7     9        ECHO                                                     !1
    9    10        ECHO                                                     '%3Cbr+%2F%3E'
   11    11        ECHO                                                     !2
   13    12        ECHO                                                     '%3Cbr+%2F%3E'
   16    13        INIT_FCALL                                               'explode'
         14        SEND_VAL                                                 '%2C'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !3, $11
   18    18      > FE_RESET_R                                       $13     !3, ->23
         19    > > FE_FETCH_R                                               $13, !4, ->23
   19    20    >   ECHO                                                     !4
   20    21        ECHO                                                     '%3Cbr+%2F%3E'
   18    22      > JMP                                                      ->19
         23    >   FE_FREE                                                  $13
   23    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.05 ms | 1395 KiB | 17 Q