3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function __destruct() { echo 'D'; } } (function() { echo '1'; new Foo; echo '2'; $o = new Foo; echo '3'; })();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FCEBg
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FFCEBg%3A9%240'
   15     1        INIT_DYNAMIC_CALL                                        ~0
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FFCEBg%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FCEBg
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     '1'
   11     1        NEW                                              $1      'Foo'
          2        DO_FCALL                                      0          
          3        FREE                                                     $1
   12     4        ECHO                                                     '2'
   13     5        NEW                                              $3      'Foo'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $3
   14     8        ECHO                                                     '3'
   15     9      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FFCEBg%3A9%240

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

End of function __destruct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.55 ms | 1398 KiB | 13 Q