3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['41136.07.6', '21511.01.1']; function substr05(&$item) { $item = substr($item, 0, 5); } array_walk($arr, "substr05"); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TIaeb
function name:  (null)
number of ops:  9
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'substr05'
          4        DO_ICALL                                                 
   11     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function substr05:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TIaeb
function name:  substr05
number of ops:  8
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 5
          5        DO_ICALL                                         $1      
          6        ASSIGN                                                   !0, $1
    7     7      > RETURN                                                   null

End of function substr05

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.92 ms | 1012 KiB | 16 Q