3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('2019-12-24'); $properties = []; foreach ($date as $k => $v) { $properties[$k] = $v; } var_dump($date); var_dump((array) $date); var_dump($properties); echo json_encode($date), "\n"; echo json_encode((array) $date), "\n"; echo json_encode($properties), "\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/h99LLn
function name:  (null)
number of ops:  39
compiled vars:  !0 = $date, !1 = $properties, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DateTime'
          1        SEND_VAL_EX                                              '2019-12-24'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    4     4        ASSIGN                                                   !1, <array>
    5     5      > FE_RESET_R                                       $8      !0, ->11
          6    > > FE_FETCH_R                                       ~9      $8, !2, ->11
          7    >   ASSIGN                                                   !3, ~9
    6     8        ASSIGN_DIM                                               !1, !3
          9        OP_DATA                                                  !2
    5    10      > JMP                                                      ->6
         11    >   FE_FREE                                                  $8
    8    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
    9    15        INIT_FCALL                                               'var_dump'
         16        CAST                                          7  ~13     !0
         17        SEND_VAL                                                 ~13
         18        DO_ICALL                                                 
   10    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
   11    22        INIT_FCALL                                               'json_encode'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $16     
         25        ECHO                                                     $16
         26        ECHO                                                     '%0A'
   12    27        INIT_FCALL                                               'json_encode'
         28        CAST                                          7  ~17     !0
         29        SEND_VAL                                                 ~17
         30        DO_ICALL                                         $18     
         31        ECHO                                                     $18
         32        ECHO                                                     '%0A'
   13    33        INIT_FCALL                                               'json_encode'
         34        SEND_VAR                                                 !1
         35        DO_ICALL                                         $19     
         36        ECHO                                                     $19
         37        ECHO                                                     '%0A'
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.69 ms | 1000 KiB | 15 Q