3v4l.org

run code in 500+ PHP versions simultaneously
<?php class UserPref { public $theme; public $lang; } $obj = new UserPref(); $obj->theme = new Error("test", 0); // Error 对象有 __toString $obj->lang = "zh"; echo base64_encode(serialize($obj)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UPvMp
function name:  (null)
number of ops:  19
compiled vars:  !0 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   NEW                                                  $1      'UserPref'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
    7     3        NEW                                                  $5      'Error'
          4        SEND_VAL_EX                                                  'test'
          5        SEND_VAL_EX                                                  0
          6        DO_FCALL                                          0          
          7        ASSIGN_OBJ                                                   !0, 'theme'
          8        OP_DATA                                                      $5
    8     9        ASSIGN_OBJ                                                   !0, 'lang'
         10        OP_DATA                                                      'zh'
    9    11        INIT_FCALL                                                   'base64_encode'
         12        INIT_FCALL                                                   'serialize'
         13        SEND_VAR                                                     !0
         14        DO_ICALL                                             $8      
         15        SEND_VAR                                                     $8
         16        DO_ICALL                                             $9      
         17        ECHO                                                         $9
   10    18      > RETURN                                                       1

Class UserPref: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
132.86 ms | 1454 KiB | 15 Q