3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Asia/Tokyo'); $datetime = new DateTime('now'); $array = array( 'datetime' => $datetime ); echo json_encode($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VKbeC
function name:  (null)
number of ops:  14
compiled vars:  !0 = $datetime, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'Asia%2FTokyo'
          2        DO_ICALL                                                 
    4     3        NEW                                              $3      'DateTime'
          4        SEND_VAL_EX                                              'now'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $3
    7     7        INIT_ARRAY                                       ~6      !0, 'datetime'
    6     8        ASSIGN                                                   !1, ~6
   10     9        INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $8      
         12        ECHO                                                     $8
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.11 ms | 1386 KiB | 17 Q