3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $reflection = new ReflectionClass(DateTimeImmutable::class); $date = $reflection->newInstanceWithoutConstructor(); $date->format('Y-m-d H:i:s'); } catch (Throwable $exception) { echo $exception->getMessage(), "\n", $exception::class, "\n", implode("\n", class_parents($exception)); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 11
Branch analysis from position: 11
2 jumps found. (Code = 107) Position 1 = 12, Position 2 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d4VrY
function name:  (null)
number of ops:  28
compiled vars:  !0 = $reflection, !1 = $date, !2 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $3      'ReflectionClass'
          1        SEND_VAL_EX                                              'DateTimeImmutable'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    5     4        INIT_METHOD_CALL                                         !0, 'newInstanceWithoutConstructor'
          5        DO_FCALL                                      0  $6      
          6        ASSIGN                                                   !1, $6
    6     7        INIT_METHOD_CALL                                         !1, 'format'
          8        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
          9        DO_FCALL                                      0          
         10      > JMP                                                      ->27
    7    11  E > > CATCH                                       last         'Throwable'
    8    12    >   INIT_METHOD_CALL                                         !2, 'getMessage'
         13        DO_FCALL                                      0  $9      
         14        ECHO                                                     $9
         15        ECHO                                                     '%0A'
    9    16        FETCH_CLASS_NAME                                 ~10     !2
         17        ECHO                                                     ~10
         18        ECHO                                                     '%0A'
   10    19        INIT_FCALL                                               'implode'
         20        SEND_VAL                                                 '%0A'
         21        INIT_FCALL                                               'class_parents'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                         $11     
         24        SEND_VAR                                                 $11
         25        DO_ICALL                                         $12     
         26        ECHO                                                     $12
   11    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.12 ms | 999 KiB | 15 Q