3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { /** * @var someObject */ private $mouse; function __construct() { $this->mouse = new stdClass(); var_dump($this->mouse); if($this->data()->password === 'hello') { echo "oop"; } $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/0CR0Q
function name:  (null)
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     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 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/0CR0Q
function name:  __construct
number of ops:  22
compiled vars:  !0 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'mouse'
          3        OP_DATA                                                  $2
   13     4        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~4      'mouse'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   15     8        INIT_METHOD_CALL                                         'data'
          9        DO_FCALL                                      0  $6      
         10        FETCH_OBJ_R                                      ~7      $6, 'password'
         11        IS_IDENTICAL                                             ~7, 'hello'
         12      > JMPZ                                                     ~8, ->14
   16    13    >   ECHO                                                     'oop'
   20    14    >   INIT_METHOD_CALL                                         'data'
         15        DO_FCALL                                      0  $9      
         16        ASSIGN                                                   !0, $9
   21    17        INIT_FCALL                                               'var_dump'
         18        FETCH_OBJ_R                                      ~11     !0, 'password'
         19        SEND_VAL                                                 ~11
         20        DO_ICALL                                                 
   22    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/0CR0Q
function name:  data
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   FETCH_OBJ_R                                      ~0      'mouse'
          1      > RETURN                                                   ~0
   27     2*     > RETURN                                                   null

End of function data

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.2 ms | 1396 KiB | 15 Q