3v4l.org

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

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

End of function __construct

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.36 ms | 1395 KiB | 15 Q