3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C {} class D extends C {} $c = serialize(new C); $d = serialize(new D); var_dump(unserialize($c, ["allowed_classes" => ["C"]])); var_dump(unserialize($c, ["allowed_classes" => ["D"]])); var_dump(unserialize($d, ["allowed_classes" => ["C"]])); var_dump(unserialize($d, ["allowed_classes" => ["D"]]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3HGAJ
function name:  (null)
number of ops:  41
compiled vars:  !0 = $c, !1 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'serialize'
          1        NEW                                              $2      'C'
          2        DO_FCALL                                      0          
          3        SEND_VAR                                                 $2
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !0, $4
    7     6        INIT_FCALL                                               'serialize'
          7        NEW                                              $6      'D'
          8        DO_FCALL                                      0          
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !1, $8
    9    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'unserialize'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 <array>
         16        DO_ICALL                                         $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                                 
   10    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'unserialize'
         21        SEND_VAR                                                 !0
         22        SEND_VAL                                                 <array>
         23        DO_ICALL                                         $12     
         24        SEND_VAR                                                 $12
         25        DO_ICALL                                                 
   11    26        INIT_FCALL                                               'var_dump'
         27        INIT_FCALL                                               'unserialize'
         28        SEND_VAR                                                 !1
         29        SEND_VAL                                                 <array>
         30        DO_ICALL                                         $14     
         31        SEND_VAR                                                 $14
         32        DO_ICALL                                                 
   12    33        INIT_FCALL                                               'var_dump'
         34        INIT_FCALL                                               'unserialize'
         35        SEND_VAR                                                 !1
         36        SEND_VAL                                                 <array>
         37        DO_ICALL                                         $16     
         38        SEND_VAR                                                 $16
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Class C: [no user functions]
Class D: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.28 ms | 1396 KiB | 19 Q