3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { /** * @var someObject */ private $mouse; function __construct() { if($this->data()->password === 'hello') { echo "oop"; } $this->mouse = new stdClass(); } public function data() { return $mouse; } } $a = new foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NSMDl
function name:  (null)
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/NSMDl
function name:  __construct
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_METHOD_CALL                                         'data'
          1        DO_FCALL                                      0  $0      
          2        FETCH_OBJ_R                                      ~1      $0, 'password'
          3        IS_IDENTICAL                                             ~1, 'hello'
          4      > JMPZ                                                     ~2, ->6
   12     5    >   ECHO                                                     'oop'
   15     6    >   NEW                                              $4      'stdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN_OBJ                                               'mouse'
          9        OP_DATA                                                  $4
   16    10      > RETURN                                                   null

End of function __construct

Function data:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NSMDl
function name:  data
number of ops:  2
compiled vars:  !0 = $mouse
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E > > RETURN                                                   !0
   21     1*     > RETURN                                                   null

End of function data

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.82 ms | 1394 KiB | 13 Q