3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ public $info; public function __destruct(){ $this->info->func(); } } class B{ public $end; public function __wakeup(){ $this->end = "exit();"; echo '__wakeup'; } public function __call($method, $args){ eval('echo "aaaa";' . $this->end . 'echo "bbb";'); } } $b = new B(); $b->info = new A(); //echo serialize($b); unserialize('O:1:"A":2:{s:4:"info";O:1:"B":1:{s:3:"end";s:10:"phpinfo();";}s:3:"end";s:1:"1";}');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KSB15
function name:  (null)
number of ops:  11
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        NEW                                              $5      'A'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'info'
          6        OP_DATA                                                  $5
   23     7        INIT_FCALL                                               'unserialize'
          8        SEND_VAL                                                 'O%3A1%3A%22A%22%3A2%3A%7Bs%3A4%3A%22info%22%3BO%3A1%3A%22B%22%3A1%3A%7Bs%3A3%3A%22end%22%3Bs%3A10%3A%22phpinfo%28%29%3B%22%3B%7Ds%3A3%3A%22end%22%3Bs%3A1%3A%221%22%3B%7D'
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

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

End of function __destruct

End of class A.

Class B:
Function __wakeup:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KSB15
function name:  __wakeup
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN_OBJ                                               'end'
          1        OP_DATA                                                  'exit%28%29%3B'
   14     2        ECHO                                                     '__wakeup'
   15     3      > RETURN                                                   null

End of function __wakeup

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KSB15
function name:  __call
number of ops:  7
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        FETCH_OBJ_R                                      ~2      'end'
          3        CONCAT                                           ~3      'echo+%22aaaa%22%3B', ~2
          4        CONCAT                                           ~4      ~3, 'echo+%22bbb%22%3B'
          5        INCLUDE_OR_EVAL                                          ~4, EVAL
   18     6      > RETURN                                                   null

End of function __call

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.29 ms | 1006 KiB | 14 Q