3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function __construct() { if($this->data()->password === 'hello') { echo "oop"; } } public function data() { return "hello"; } } $a = new foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KnZM4
function name:  (null)
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     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/KnZM4
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     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
    9     5    >   ECHO                                                     'oop'
   11     6    > > 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/KnZM4
function name:  data
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   'hello'
   16     1*     > RETURN                                                   null

End of function data

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.48 ms | 1385 KiB | 13 Q