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(); var_dump($this->mouse); $thing = $this->data(); var_dump($thing->password); } public function data() { return $this->mouse; } } $a = new foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oQ7mI
function name:  (null)
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     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/oQ7mI
function name:  __construct
number of ops:  22
compiled vars:  !0 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_METHOD_CALL                                         'data'
          1        DO_FCALL                                      0  $1      
          2        FETCH_OBJ_R                                      ~2      $1, 'password'
          3        IS_IDENTICAL                                             ~2, 'hello'
          4      > JMPZ                                                     ~3, ->6
   14     5    >   ECHO                                                     'oop'
   17     6    >   NEW                                              $5      'stdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN_OBJ                                               'mouse'
          9        OP_DATA                                                  $5
   18    10        INIT_FCALL                                               'var_dump'
         11        FETCH_OBJ_R                                      ~7      'mouse'
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                                 
   21    14        INIT_METHOD_CALL                                         'data'
         15        DO_FCALL                                      0  $9      
         16        ASSIGN                                                   !0, $9
   22    17        INIT_FCALL                                               'var_dump'
         18        FETCH_OBJ_R                                      ~11     !0, 'password'
         19        SEND_VAL                                                 ~11
         20        DO_ICALL                                                 
   23    21      > 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/oQ7mI
function name:  data
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   FETCH_OBJ_R                                      ~0      'mouse'
          1      > RETURN                                                   ~0
   28     2*     > RETURN                                                   null

End of function data

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
198.39 ms | 1400 KiB | 15 Q