3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TH { public function entities(&$val) { $val = htmlentities($val); } } $th = new TH($val); $arr = array('f' => '<pizza>', 'g' => '<onions>'); array_walk($arr, array($th, 'entities')); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cIe0I
function name:  (null)
number of ops:  15
compiled vars:  !0 = $th, !1 = $val, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $3      'TH'
          1        SEND_VAR_EX                                              !1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    8     4        ASSIGN                                                   !2, <array>
    9     5        INIT_FCALL                                               'array_walk'
          6        SEND_REF                                                 !2
          7        INIT_ARRAY                                       ~7      !0
          8        ADD_ARRAY_ELEMENT                                ~7      'entities'
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                                 
   10    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function entities

End of class TH.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.87 ms | 1395 KiB | 19 Q