3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function __destruct() { printf('%s destroyed', __CLASS__); } } function f(C $c) { echo __FUNCTION__; } function g(C $c) { unset($c); echo __FUNCTION__; } f(new C()); g(new C());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZYZNP
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'f'
          1        NEW                                              $0      'C'
          2        DO_FCALL                                      0          
          3        SEND_VAR                                                 $0
          4        DO_FCALL                                      0          
   21     5        INIT_FCALL                                               'g'
          6        NEW                                              $3      'C'
          7        DO_FCALL                                      0          
          8        SEND_VAR                                                 $3
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZYZNP
function name:  f
number of ops:  3
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        ECHO                                                     'f'
   12     2      > RETURN                                                   null

End of function f

Function g:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZYZNP
function name:  g
number of ops:  4
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        UNSET_CV                                                 !0
   17     2        ECHO                                                     'g'
   18     3      > RETURN                                                   null

End of function g

Class C:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZYZNP
function name:  __destruct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'printf'
          1        SEND_VAL                                                 '%25s+destroyed'
          2        SEND_VAL                                                 'C'
          3        DO_ICALL                                                 
    6     4      > RETURN                                                   null

End of function __destruct

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.22 ms | 1398 KiB | 17 Q