3v4l.org

run code in 300+ PHP versions simultaneously
<?php class e { public function foo() { $file = fopen('php://input', 'r'); $this->$file = 'foo'; return $this; } } var_dump((new e)->foo());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VD7t1
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'var_dump'
          1        NEW                                              $0      'e'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'foo'
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Class e:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VD7t1
function name:  foo
number of ops:  10
compiled vars:  !0 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'php%3A%2F%2Finput'
          2        SEND_VAL                                                 'r'
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    6     5        ASSIGN_OBJ                                               !0
          6        OP_DATA                                                  'foo'
    7     7        FETCH_THIS                                       ~4      
          8      > RETURN                                                   ~4
    8     9*     > RETURN                                                   null

End of function foo

End of class e.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
130.02 ms | 1399 KiB | 17 Q