3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function x($i) { return $i; } public function abc() { return array_map(function($i) { return $$this->x($i); }, [1,2,3]); } } $a = new A(); var_dump($a->abc());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NJNPe
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'abc'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNJNPe%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NJNPe
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        FETCH_THIS                                       ~1      
          2        FETCH_R                      local               ~2      ~1
          3        INIT_METHOD_CALL                                         ~2, 'x'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $3      
          6      > RETURN                                                   $3
   12     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNJNPe%3A10%240

Class A:
Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NJNPe
function name:  x
number of ops:  3
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1      > RETURN                                                   !0
    7     2*     > RETURN                                                   null

End of function x

Function abc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NJNPe
function name:  abc
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'array_map'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNJNPe%3A10%240'
   12     2        SEND_VAL                                                 ~0
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
   13     6*     > RETURN                                                   null

End of function abc

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.87 ms | 1396 KiB | 17 Q