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[$i] = substr($string[$i],0,3); //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/I2rKj
function name:  (null)
number of ops:  12
compiled vars:  !0 = $days_of_week, !1 = $stry
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'stringparse'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !0, $3
   14     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 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
Branch analysis from position: 3
filename:       /in/I2rKj
function name:  stringParse
number of ops:  17
compiled vars:  !0 = $string, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->12
    7     3    >   INIT_FCALL                                               'substr'
          4        FETCH_DIM_R                                      ~4      !0, !1
          5        SEND_VAL                                                 ~4
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 3
          8        DO_ICALL                                         $5      
          9        ASSIGN_DIM                                               !0, !1
         10        OP_DATA                                                  $5
    6    11        PRE_INC                                                  !1
         12    >   COUNT                                            ~7      !0
         13        IS_SMALLER                                               !1, ~7
         14      > JMPNZ                                                    ~8, ->3
   10    15    > > RETURN                                                   !0
   11    16*     > RETURN                                                   null

End of function stringparse

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.44 ms | 1399 KiB | 16 Q