3v4l.org

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

Class foo: [no user functions]
Class bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163 ms | 1385 KiB | 19 Q