3v4l.org

run code in 500+ PHP versions simultaneously
<?php try { $tz = new DateTimeZone('Invalid timezone'); } catch (\Exception $exception) { echo "Invalid time zone (error: " . $exception->getMessage() . ")\n"; $tz = null; } var_dump($tz);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vWmCp
function name:  (null)
number of ops:  16
compiled vars:  !0 = $tz, !1 = $exception
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   NEW                                                  $2      'DateTimeZone'
          1        SEND_VAL_EX                                                  'Invalid+timezone'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $2
          4      > JMP                                                          ->12
    5     5  E > > CATCH                                           last         'Exception'
    6     6    >   INIT_METHOD_CALL                                             !1, 'getMessage'
          7        DO_FCALL                                          0  $5      
          8        CONCAT                                               ~6      'Invalid+time+zone+%28error%3A+', $5
          9        CONCAT                                               ~7      ~6, '%29%0A'
         10        ECHO                                                         ~7
    7    11        ASSIGN                                                       !0, null
    9    12    >   INIT_FCALL                                                   'var_dump'
         13        SEND_VAR                                                     !0
         14        DO_ICALL                                                     
         15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
184.23 ms | 1585 KiB | 9 Q