3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = new DateTime('2016-01-01 00:00:00'); $a = (array) $test; unset($test); $new = DateTime::__set_state($a); var_dump($new->__serialize());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5rQp8
function name:  (null)
number of ops:  17
compiled vars:  !0 = $test, !1 = $a, !2 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '2016-01-01+00%3A00%3A00'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    5     4        CAST                                          7  ~6      !0
          5        ASSIGN                                                   !1, ~6
    7     6        UNSET_CV                                                 !0
   10     7        INIT_STATIC_METHOD_CALL                                  'DateTime', '__set_state'
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0  $8      
         10        ASSIGN                                                   !2, $8
   11    11        INIT_FCALL                                               'var_dump'
         12        INIT_METHOD_CALL                                         !2, '__serialize'
         13        DO_FCALL                                      0  $10     
         14        SEND_VAR                                                 $10
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.12 ms | 1394 KiB | 15 Q