3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "www.mylink1.com,link copy 1 www.mylink2.com, link copy 2 www.mylink3.com,link copy 3"; $lines = explode(PHP_EOL, $str); Foreach($lines as $line){ $linktext = explode(",", $line); Echo "<li><a href='" . trim($linktext[0]) . "'>" . trim($linktext[1]) . "</a></li>\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 27
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 27
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/6RkW3
function name:  (null)
number of ops:  29
compiled vars:  !0 = $str, !1 = $lines, !2 = $line, !3 = $linktext
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'www.mylink1.com%2Clink+copy+1%0Awww.mylink2.com%2C+link+copy+2%0Awww.mylink3.com%2Clink+copy+3'
    7     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%0A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    9     6      > FE_RESET_R                                       $7      !1, ->27
          7    > > FE_FETCH_R                                               $7, !2, ->27
   10     8    >   INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%2C'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !3, $8
   11    13        INIT_FCALL                                               'trim'
         14        FETCH_DIM_R                                      ~10     !3, 0
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                         $11     
         17        CONCAT                                           ~12     '%3Cli%3E%3Ca+href%3D%27', $11
         18        CONCAT                                           ~13     ~12, '%27%3E'
         19        INIT_FCALL                                               'trim'
         20        FETCH_DIM_R                                      ~14     !3, 1
         21        SEND_VAL                                                 ~14
         22        DO_ICALL                                         $15     
         23        CONCAT                                           ~16     ~13, $15
         24        CONCAT                                           ~17     ~16, '%3C%2Fa%3E%3C%2Fli%3E%0A'
         25        ECHO                                                     ~17
    9    26      > JMP                                                      ->7
         27    >   FE_FREE                                                  $7
   12    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.08 ms | 1012 KiB | 15 Q