3v4l.org

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

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

End of function __construct

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nZLgq
function name:  bar
number of ops:  8
compiled vars:  !0 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV_INIT                                        !0      null
   14     1        FETCH_OBJ_R                                      ~2      'bar'
          2        FETCH_DIM_R                                      ~3      ~2, 'foo'
          3        FETCH_DIM_R                                      ~4      ~3, !0
          4        INIT_ARRAY                                       ~5      ~4, 'foo'
          5        ASSIGN_OBJ                                               'baz'
          6        OP_DATA                                                  ~5
   16     7      > RETURN                                                   null

End of function bar

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.61 ms | 1396 KiB | 15 Q