3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (range('a', 'z') as $letter) { try { $dt = new DateTime($letter); echo "$letter SUCCESS {$dt->format("r")}\n"; } catch (Exception $e) { echo "$letter FAIL\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 24
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 24
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Found catch point at position: 19
Branch analysis from position: 19
2 jumps found. (Code = 107) Position 1 = 20, Position 2 = -2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
filename:       /in/mvTIV
function name:  (null)
number of ops:  26
compiled vars:  !0 = $letter, !1 = $dt, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 'a'
          2        SEND_VAL                                                 'z'
          3        DO_ICALL                                         $3      
          4      > FE_RESET_R                                       $4      $3, ->24
          5    > > FE_FETCH_R                                               $4, !0, ->24
    5     6    >   NEW                                              $5      'DateTime'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $5
    6    10        ROPE_INIT                                     4  ~10     !0
         11        ROPE_ADD                                      1  ~10     ~10, '+SUCCESS+'
         12        INIT_METHOD_CALL                                         !1, 'format'
         13        SEND_VAL_EX                                              'r'
         14        DO_FCALL                                      0  $8      
         15        ROPE_ADD                                      2  ~10     ~10, $8
         16        ROPE_END                                      3  ~9      ~10, '%0A'
         17        ECHO                                                     ~9
         18      > JMP                                                      ->23
    7    19  E > > CATCH                                       last         'Exception'
    8    20    >   NOP                                                      
         21        FAST_CONCAT                                      ~12     !0, '+FAIL%0A'
         22        ECHO                                                     ~12
    3    23    > > JMP                                                      ->5
         24    >   FE_FREE                                                  $4
   10    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.61 ms | 1396 KiB | 15 Q