3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function i() { echo "new self()\n"; return new self(); } public function __unset($name) { echo __METHOD__, "(", $name, ")\n"; } } unset(A::i()->foo); echo "ok\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O2nm4
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'i'
          1        DO_FCALL                                      0  $0      
          2        SEPARATE                                         $0      $0
          3        UNSET_OBJ                                                $0, 'foo'
   13     4        ECHO                                                     'ok%0A'
          5      > RETURN                                                   1

Class A:
Function i:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O2nm4
function name:  i
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'new+self%28%29%0A'
    5     1        NEW                          self                $0      
          2        DO_FCALL                                      0          
          3      > RETURN                                                   $0
    6     4*     > RETURN                                                   null

End of function i

Function __unset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O2nm4
function name:  __unset
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ECHO                                                     'A%3A%3A__unset'
          2        ECHO                                                     '%28'
          3        ECHO                                                     !0
          4        ECHO                                                     '%29%0A'
    9     5      > RETURN                                                   null

End of function __unset

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.15 ms | 1394 KiB | 13 Q