3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait SkipAssignInConstruct2 { /** * @var bool */ public $property; public function __construct(bool $property) { $this->property = $property; } } class Foo { use SkipAssignInConstruct2; public function __construct() { } } var_dump((new Foo())->property);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MZFmT
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   DECLARE_CLASS                                            'foo'
   25     1        INIT_FCALL                                               'var_dump'
          2        NEW                                              $0      'Foo'
          3        DO_FCALL                                      0          
          4        FETCH_OBJ_R                                      ~2      $0, 'property'
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

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

End of function __construct

End of class SkipAssignInConstruct2.

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MZFmT
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E > > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.89 ms | 1087 KiB | 14 Q