3v4l.org

run code in 300+ PHP versions simultaneously
<?php const COMMA = ','; const EMPTYSTR = ''; const NEWLINE_CHAR = '\n'; const ENDL = "\n"; $data = '1,2,3,\n,4,5,6,\n,7,8,9'; $strNumsEtc = str_replace( COMMA, EMPTYSTR, $data); $strArr = explode(NEWLINE_CHAR,$strNumsEtc); foreach ($strArr as $str) { echo $str,ENDL; } echo 'Shon',"\\",NEWLINE_CHAR;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/cN3lg
function name:  (null)
number of ops:  31
compiled vars:  !0 = $data, !1 = $strNumsEtc, !2 = $strArr, !3 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CONST                                            'COMMA', '%2C'
    3     1        DECLARE_CONST                                            'EMPTYSTR', ''
    4     2        DECLARE_CONST                                            'NEWLINE_CHAR', '%5Cn'
    5     3        DECLARE_CONST                                            'ENDL', '%0A'
    6     4        ASSIGN                                                   !0, '1%2C2%2C3%2C%5Cn%2C4%2C5%2C6%2C%5Cn%2C7%2C8%2C9'
    7     5        INIT_FCALL                                               'str_replace'
          6        FETCH_CONSTANT                                   ~5      'COMMA'
          7        SEND_VAL                                                 ~5
          8        FETCH_CONSTANT                                   ~6      'EMPTYSTR'
          9        SEND_VAL                                                 ~6
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !1, $7
    8    13        INIT_FCALL                                               'explode'
         14        FETCH_CONSTANT                                   ~9      'NEWLINE_CHAR'
         15        SEND_VAL                                                 ~9
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $10     
         18        ASSIGN                                                   !2, $10
    9    19      > FE_RESET_R                                       $12     !2, ->25
         20    > > FE_FETCH_R                                               $12, !3, ->25
   10    21    >   ECHO                                                     !3
         22        FETCH_CONSTANT                                   ~13     'ENDL'
         23        ECHO                                                     ~13
    9    24      > JMP                                                      ->20
         25    >   FE_FREE                                                  $12
   12    26        ECHO                                                     'Shon'
         27        ECHO                                                     '%5C'
         28        FETCH_CONSTANT                                   ~14     'NEWLINE_CHAR'
         29        ECHO                                                     ~14
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.66 ms | 1396 KiB | 17 Q