3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function run($a) { echo get_type($a); } }; // class B extends A // { // public function run() // { // echo get_class($a); // } // } $a = array(1, 2, 3); $A = new A(); $A->run($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c0OX1
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a, !1 = $A
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ASSIGN                                                   !0, <array>
   22     1        NEW                                              $3      'A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   23     4        INIT_METHOD_CALL                                         !1, 'run'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class A:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c0OX1
function name:  run
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_FCALL_BY_NAME                                       'get_type'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4        ECHO                                                     $1
    8     5      > RETURN                                                   null

End of function run

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.71 ms | 1393 KiB | 13 Q