3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $path; public function __construct($config) { if (empty($config['path'])) { return false; } $this->path = $config['path']; } public function doSomethingWithPath() { var_dump($this->path); } } $foo = new Foo(); $foo->doSomethingWithPath();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fEhrA
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_METHOD_CALL                                         !0, 'doSomethingWithPath'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fEhrA
function name:  __construct
number of ops:  8
compiled vars:  !0 = $config
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ISSET_ISEMPTY_DIM_OBJ                         1          !0, 'path'
          2      > JMPZ                                                     ~1, ->4
   10     3    > > RETURN                                                   <false>
   13     4    >   FETCH_DIM_R                                      ~3      !0, 'path'
          5        ASSIGN_OBJ                                               'path'
          6        OP_DATA                                                  ~3
   14     7      > RETURN                                                   null

End of function __construct

Function dosomethingwithpath:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fEhrA
function name:  doSomethingWithPath
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'path'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   19     4      > RETURN                                                   null

End of function dosomethingwithpath

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.34 ms | 1399 KiB | 15 Q