3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public $a; function __destruct() { $t=1337; echo(serialize($this->a)); } } class b { public $b; function __wakeup() { $this->b=null; } } $i='x:i:0;O:10:"FixedArray":2:{i:0;i:1711;i:1;O:1:"a":1:{s:1:"a";R:1;}};m:a:0:{}'; $x=unserialize('a:2:{i:0;C:11:"ArrayObject":'.strlen($i).':{'.$i.'}i:1;O:1:"b":1:{s:1:"b";R:4;}}'); $x=null; echo('doe');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f4oN0
function name:  (null)
number of ops:  13
compiled vars:  !0 = $i, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN                                                   !0, 'x%3Ai%3A0%3BO%3A10%3A%22FixedArray%22%3A2%3A%7Bi%3A0%3Bi%3A1711%3Bi%3A1%3BO%3A1%3A%22a%22%3A1%3A%7Bs%3A1%3A%22a%22%3BR%3A1%3B%7D%7D%3Bm%3Aa%3A0%3A%7B%7D'
   16     1        INIT_FCALL                                               'unserialize'
          2        STRLEN                                           ~3      !0
          3        CONCAT                                           ~4      'a%3A2%3A%7Bi%3A0%3BC%3A11%3A%22ArrayObject%22%3A', ~3
          4        CONCAT                                           ~5      ~4, '%3A%7B'
          5        CONCAT                                           ~6      ~5, !0
          6        CONCAT                                           ~7      ~6, '%7Di%3A1%3BO%3A1%3A%22b%22%3A1%3A%7Bs%3A1%3A%22b%22%3BR%3A4%3B%7D%7D'
          7        SEND_VAL                                                 ~7
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !1, $8
   17    10        ASSIGN                                                   !1, null
   18    11        ECHO                                                     'doe'
         12      > RETURN                                                   1

Class a:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f4oN0
function name:  __destruct
number of ops:  7
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 1337
    6     1        INIT_FCALL                                               'serialize'
          2        FETCH_OBJ_R                                      ~2      'a'
          3        SEND_VAL                                                 ~2
          4        DO_ICALL                                         $3      
          5        ECHO                                                     $3
    7     6      > 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/f4oN0
function name:  __wakeup
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN_OBJ                                               'b'
          1        OP_DATA                                                  null
   13     2      > RETURN                                                   null

End of function __wakeup

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.87 ms | 1388 KiB | 17 Q