3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Super { public function __construct($something) { $this->something = $something; } public static function make($array) { return array_map(function ($el) { return new static($el); }, $array); } } class Child extends Super { } echo phpversion(), "\n"; print_r(Child::make([1,2,3]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lk4i0
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'phpversion'
          1        DO_ICALL                                         $0      
          2        ECHO                                                     $0
          3        ECHO                                                     '%0A'
   22     4        INIT_FCALL                                               'print_r'
          5        INIT_STATIC_METHOD_CALL                                  'Child', 'make'
          6        SEND_VAL                                                 <array>
          7        DO_FCALL                                      0  $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Flk4i0%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lk4i0
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $el
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        NEW                          static              $1      
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   $1
   13     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Flk4i0%3A11%240

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

End of function __construct

Function make:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lk4i0
function name:  make
number of ops:  8
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Flk4i0%3A11%240'
   13     3        SEND_VAL                                                 ~1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
   14     7*     > RETURN                                                   null

End of function make

End of class Super.

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

End of function __construct

Function make:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lk4i0
function name:  make
number of ops:  8
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Flk4i0%3A11%240'
   13     3        SEND_VAL                                                 ~1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
   14     7*     > RETURN                                                   null

End of function make

End of class Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.82 ms | 1400 KiB | 19 Q