3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyTest { public function __construct() { $array = array( 1, 2, 3 ); $r = array_map( array($this,'getHoge'), $array ); var_dump($r); } public static function getHoge($item){ $item ++; } } new MyTest();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WllSY
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $0      'MyTest'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
          3      > RETURN                                                   1

Class MyTest:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WllSY
function name:  __construct
number of ops:  13
compiled vars:  !0 = $array, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'array_map'
          2        FETCH_THIS                                       ~3      
          3        INIT_ARRAY                                       ~4      ~3
          4        ADD_ARRAY_ELEMENT                                ~4      'getHoge'
          5        SEND_VAL                                                 ~4
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
   12     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   14    12      > RETURN                                                   null

End of function __construct

Function gethoge:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WllSY
function name:  getHoge
number of ops:  3
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        PRE_INC                                                  !0
   20     2      > RETURN                                                   null

End of function gethoge

End of class MyTest.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.32 ms | 1395 KiB | 17 Q