3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('yesterday'); $serialized = array( 'class' => get_class($start), 'state' => (array) $start ); unset($start); var_dump(call_user_function($serialized['class'], '__set_state', $serialized['state']));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NOvDW
function name:  (null)
number of ops:  23
compiled vars:  !0 = $start, !1 = $serialized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'DateTime'
          1        SEND_VAL_EX                                              'yesterday'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    7     4        GET_CLASS                                        ~5      !0
          5        INIT_ARRAY                                       ~6      ~5, 'class'
    8     6        CAST                                          7  ~7      !0
          7        ADD_ARRAY_ELEMENT                                ~6      ~7, 'state'
    6     8        ASSIGN                                                   !1, ~6
   11     9        UNSET_CV                                                 !0
   13    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL_BY_NAME                                       'call_user_function'
         12        CHECK_FUNC_ARG                                           
         13        FETCH_DIM_FUNC_ARG                               $9      !1, 'class'
         14        SEND_FUNC_ARG                                            $9
         15        SEND_VAL_EX                                              '__set_state'
         16        CHECK_FUNC_ARG                                           
         17        FETCH_DIM_FUNC_ARG                               $10     !1, 'state'
         18        SEND_FUNC_ARG                                            $10
         19        DO_FCALL                                      0  $11     
         20        SEND_VAR                                                 $11
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.67 ms | 1395 KiB | 15 Q