3v4l.org

run code in 300+ PHP versions simultaneously
<?php $days_of_week = array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"); function stringParse(array $string) { for($i = 0; $i < count($string); $i++) { $string = str_replace($string[$i], substr($string[$i],0,3), $string); echo $string[$i].'<br />'; } return $string; } $days_of_week = stringParse($days_of_week); foreach($days_of_week as $stry) {echo $stry.'<br />';}
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/3dtlp
function name:  (null)
number of ops:  12
compiled vars:  !0 = $days_of_week, !1 = $stry
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'stringparse'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !0, $3
   13     5      > FE_RESET_R                                       $5      !0, ->10
          6    > > FE_FETCH_R                                               $5, !1, ->10
          7    >   CONCAT                                           ~6      !1, '%3Cbr+%2F%3E'
          8        ECHO                                                     ~6
          9      > JMP                                                      ->6
         10    >   FE_FREE                                                  $5
         11      > RETURN                                                   1

Function stringparse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 3
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 3
Branch analysis from position: 23
Branch analysis from position: 3
filename:       /in/3dtlp
function name:  stringParse
number of ops:  25
compiled vars:  !0 = $string, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->20
    6     3    >   INIT_FCALL                                               'str_replace'
          4        FETCH_DIM_R                                      ~3      !0, !1
          5        SEND_VAL                                                 ~3
          6        INIT_FCALL                                               'substr'
          7        FETCH_DIM_R                                      ~4      !0, !1
          8        SEND_VAL                                                 ~4
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 3
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !0, $6
    7    16        FETCH_DIM_R                                      ~8      !0, !1
         17        CONCAT                                           ~9      ~8, '%3Cbr+%2F%3E'
         18        ECHO                                                     ~9
    5    19        PRE_INC                                                  !1
         20    >   COUNT                                            ~11     !0
         21        IS_SMALLER                                               !1, ~11
         22      > JMPNZ                                                    ~12, ->3
    9    23    > > RETURN                                                   !0
   10    24*     > RETURN                                                   null

End of function stringparse

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.28 ms | 948 KiB | 19 Q