3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (range('a', 'z') as $letter) { try { new DateTime($letter); echo "$letter SUCCESS\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 = 19
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Found catch point at position: 14
Branch analysis from position: 14
2 jumps found. (Code = 107) Position 1 = 15, Position 2 = -2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
filename:       /in/AJNMk
function name:  (null)
number of ops:  21
compiled vars:  !0 = $letter, !1 = $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                                         $2      
          4      > FE_RESET_R                                       $3      $2, ->19
          5    > > FE_FETCH_R                                               $3, !0, ->19
    5     6    >   NEW                                              $4      'DateTime'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        FREE                                                     $4
    6    10        NOP                                                      
         11        FAST_CONCAT                                      ~6      !0, '+SUCCESS%0A'
         12        ECHO                                                     ~6
         13      > JMP                                                      ->18
    7    14  E > > CATCH                                       last         'Exception'
    8    15    >   NOP                                                      
         16        FAST_CONCAT                                      ~7      !0, '+FAIL%0A'
         17        ECHO                                                     ~7
    3    18    > > JMP                                                      ->5
         19    >   FE_FREE                                                  $3
   10    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.36 ms | 1387 KiB | 15 Q