3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = array('in_monitoring' => new DateTime('now', new DateTimeZone('UTC'))); $json = json_encode($var); echo $json; $arr = json_decode($json); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7ppBf
function name:  (null)
number of ops:  22
compiled vars:  !0 = $var, !1 = $json, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              'now'
          2        NEW                                              $4      'DateTimeZone'
          3        SEND_VAL_EX                                              'UTC'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $4
          6        DO_FCALL                                      0          
          7        INIT_ARRAY                                       ~7      $3, 'in_monitoring'
          8        ASSIGN                                                   !0, ~7
    5     9        INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !1, $9
    6    13        ECHO                                                     !1
    8    14        INIT_FCALL                                               'json_decode'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !2, $11
   10    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.68 ms | 1399 KiB | 19 Q