3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public $prop; public function __wakeup() { echo __METHOD__ . " is running.\n"; } public function quux() { echo __METHOD__ . " is running.\n"; } } Class Bar { public $a; public function __destruct() { $this->a->quux(); } } unserialize('O:3:"Bar":1:{s:1:"a";O:3:"Foo":2:{s:4:"prop";s:3:"baz";}}');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aHZDT
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                                   'unserialize'
          1        SEND_VAL                                                     'O%3A3%3A%22Bar%22%3A1%3A%7Bs%3A1%3A%22a%22%3BO%3A3%3A%22Foo%22%3A2%3A%7Bs%3A4%3A%22prop%22%3Bs%3A3%3A%22baz%22%3B%7D%7D'
          2        DO_ICALL                                                     
          3      > RETURN                                                       1

Class Foo:
Function __wakeup:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aHZDT
function name:  __wakeup
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                         'Foo%3A%3A__wakeup+is+running.%0A'
    8     1      > RETURN                                                       null

End of function __wakeup

Function quux:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aHZDT
function name:  quux
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                         'Foo%3A%3Aquux+is+running.%0A'
   12     1      > RETURN                                                       null

End of function quux

End of class Foo.

Class Bar:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aHZDT
function name:  __destruct
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   FETCH_OBJ_R                                          ~0      'a'
          1        INIT_METHOD_CALL                                             ~0, 'quux'
          2        DO_FCALL                                          0          
   21     3      > RETURN                                                       null

End of function __destruct

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
119.37 ms | 517 KiB | 10 Q