3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sourceFormat = 'H:i'; $targetFormat = 'H:i'; $datetime = \DateTime::createFromFormat($sourceFormat, '12:00', new \DateTimeZone('Europe/Amsterdam')); $output = $datetime != false ? $datetime->format($targetFormat) : $defaultValue; var_dump($output);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e27FB
function name:  (null)
number of ops:  24
compiled vars:  !0 = $sourceFormat, !1 = $targetFormat, !2 = $datetime, !3 = $output, !4 = $defaultValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'H%3Ai'
    4     1        ASSIGN                                                   !1, 'H%3Ai'
    6     2        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '12%3A00'
          5        NEW                                              $7      'DateTimeZone'
          6        SEND_VAL_EX                                              'Europe%2FAmsterdam'
          7        DO_FCALL                                      0          
          8        SEND_VAR                                                 $7
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !2, $9
    7    11        BOOL                                             ~11     !2
         12      > JMPZ                                                     ~11, ->18
         13    >   INIT_METHOD_CALL                                         !2, 'format'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $12     
         16        QM_ASSIGN                                        ~13     $12
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~13     !4
         19    >   ASSIGN                                                   !3, ~13
    9    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.83 ms | 1395 KiB | 15 Q