3v4l.org

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

Class C:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MpDOn
function name:  foo
number of ops:  6
compiled vars:  !0 = $t
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                       !0, 'this'
    7     1        FETCH_W                          local               $2      !0
          2        ASSIGN                                                       $2, null
    8     3        FETCH_OBJ_R                                          ~4      'x'
          4      > RETURN                                                       ~4
    9     5*     > RETURN                                                       null

End of function foo

End of class C.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.36 ms | 2883 KiB | 14 Q