3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ private $b = 'b'; function get( $var ) { return $this->$var; } } function get_a() { return new A; } echo get_a()->get( 'b' );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qkcgS
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'get_a'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, 'get'
          3        SEND_VAL_EX                                              'b'
          4        DO_FCALL                                      0  $1      
          5        ECHO                                                     $1
          6      > RETURN                                                   1

Function get_a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qkcgS
function name:  get_a
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $0      'A'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
   13     3*     > RETURN                                                   null

End of function get_a

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

End of function get

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.42 ms | 1397 KiB | 14 Q