3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('America/New_York'); $date = new DateTime(); $date::jsonSerialize(); echo json_encode($date,JSON_FORCE_OBJECT); var_dump(json_last_error(), json_last_error_msg());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HmmFe
function name:  (null)
number of ops:  23
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'America%2FNew_York'
          2        DO_ICALL                                                 
    5     3        NEW                                              $2      'DateTime'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
    7     6        FETCH_CLASS                                   0  $5      !0
          7        INIT_STATIC_METHOD_CALL                                  $5, 'jsonSerialize'
          8        DO_FCALL                                      0          
    9     9        INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 16
         12        DO_ICALL                                         $7      
         13        ECHO                                                     $7
   10    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'json_last_error'
         16        DO_ICALL                                         $8      
         17        SEND_VAR                                                 $8
         18        INIT_FCALL                                               'json_last_error_msg'
         19        DO_ICALL                                         $9      
         20        SEND_VAR                                                 $9
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.17 ms | 1395 KiB | 23 Q