3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { public $name; function __invoke() {} } class Wrapper { public $x; } $wrapper = new Wrapper; $wrapper->x = new X; $wrapper->x->name = 'THENAME'; var_dump(unserialize(serialize($wrapper)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iThm7
function name:  (null)
number of ops:  20
compiled vars:  !0 = $wrapper
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'Wrapper'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        NEW                                              $5      'X'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'x'
          6        OP_DATA                                                  $5
   13     7        FETCH_OBJ_W                                      $7      !0, 'x'
          8        ASSIGN_OBJ                                               $7, 'name'
          9        OP_DATA                                                  'THENAME'
   14    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'unserialize'
         12        INIT_FCALL                                               'serialize'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $9      
         15        SEND_VAR                                                 $9
         16        DO_ICALL                                         $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class X:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iThm7
function name:  __invoke
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   null

End of function __invoke

End of class X.

Class Wrapper: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.86 ms | 1395 KiB | 19 Q