3v4l.org

run code in 300+ PHP versions simultaneously
<?php function baz($a){ unset($a); echo "2\n"; }; echo "1\n"; baz(new class(){ function __destruct(){ echo "destruct\n"; }}); echo "3\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pq97E
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     '1%0A'
    5     1        INIT_FCALL                                               'baz'
          2        DECLARE_ANON_CLASS                               9.88131e-324    
          3        NEW                                              $1      $0
          4        DO_FCALL                                      0          
          5        SEND_VAR                                                 $1
          6        DO_FCALL                                      0          
    6     7        ECHO                                                     '3%0A'
          8      > RETURN                                                   1

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

End of function baz

Class class@anonymous:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pq97E
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'destruct%0A'
          1      > RETURN                                                   null

End of function __destruct

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.3 ms | 1397 KiB | 14 Q