3v4l.org

run code in 300+ PHP versions simultaneously
<?php class someClass { public $foo; public function __destruct() { echo "__destruct(): Exterminate! Exterminate!\n"; } } demo(); echo "Back in main.\n"; function demo() { echo "Demo starts.\n"; $s = serialize(new SomeClass()); var_dump($s); $u = unserialize($s); var_dump($u); echo "Demo's over.\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fQk7C
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL_BY_NAME                                       'demo'
          1        DO_FCALL                                      0          
   11     2        ECHO                                                     'Back+in+main.%0A'
   21     3      > RETURN                                                   1

Function demo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fQk7C
function name:  demo
number of ops:  19
compiled vars:  !0 = $s, !1 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     'Demo+starts.%0A'
   15     1        INIT_FCALL                                               'serialize'
          2        NEW                                              $2      'SomeClass'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !0, $4
   16     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   18    10        INIT_FCALL                                               'unserialize'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !1, $7
   19    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
   20    17        ECHO                                                     'Demo%27s+over.%0A'
   21    18      > RETURN                                                   null

End of function demo

Class someClass:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fQk7C
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     '__destruct%28%29%3A+Exterminate%21+Exterminate%21%0A'
    7     1      > RETURN                                                   null

End of function __destruct

End of class someClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.74 ms | 1401 KiB | 19 Q