3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foobar { var $bar = 'lol'; } $blah = new Foobar(); $s = serialize($blah ); var_dump(unserialize($s , array())); var_dump(unserialize($s, ["allowed_classes" => ["MyClass", "MyClass2"]]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BVagQ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $blah, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'Foobar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    7     3        INIT_FCALL                                               'serialize'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    9     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'unserialize'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 <array>
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                                 
   11    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'unserialize'
         16        SEND_VAR                                                 !1
         17        SEND_VAL                                                 <array>
         18        DO_ICALL                                         $9      
         19        SEND_VAR                                                 $9
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Class Foobar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.15 ms | 1395 KiB | 19 Q