3v4l.org

run code in 300+ PHP versions simultaneously
<?php function trim_value(&$value) { $value = str_replace("\0", "", $value); } $fruit = array('apple','banana ', ' cran berry '); var_dump($fruit); array_walk($fruit, 'trim_value'); var_dump($fruit); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/net7F
function name:  (null)
number of ops:  12
compiled vars:  !0 = $fruit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   10     4        INIT_FCALL                                               'array_walk'
          5        SEND_REF                                                 !0
          6        SEND_VAL                                                 'trim_value'
          7        DO_ICALL                                                 
   11     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
   13    11      > RETURN                                                   1

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

End of function trim_value

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.18 ms | 1395 KiB | 19 Q