3v4l.org

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

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

End of function __construct

Function getfoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LbluE
function name:  getFoo
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                      ~0      'foo'
          1      > RETURN                                                   ~0
   12     2*     > RETURN                                                   null

End of function getfoo

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.92 ms | 1395 KiB | 15 Q