3v4l.org

run code in 300+ PHP versions simultaneously
<?php $easter = (new \DateTime())->setTimestamp(easter_date())->format('d m'); switch((new \DateTime())->format('d m')){ case '25 12'; echo "Merry Christmas"; break; case '14 02': echo "Happy Valentines Day!"; break; case $easter: echo 'Happy Easter'; break; default: echo 'No Holiday Today'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
filename:       /in/UMPIM
function name:  (null)
number of ops:  32
compiled vars:  !0 = $easter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'DateTime'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $1, 'setTimestamp'
          3        INIT_FCALL_BY_NAME                                       'easter_date'
          4        DO_FCALL                                      0  $3      
          5        SEND_VAR_NO_REF_EX                                       $3
          6        DO_FCALL                                      0  $4      
          7        INIT_METHOD_CALL                                         $4, 'format'
          8        SEND_VAL_EX                                              'd+m'
          9        DO_FCALL                                      0  $5      
         10        ASSIGN                                                   !0, $5
    4    11        NEW                                              $7      'DateTime'
         12        DO_FCALL                                      0          
         13        INIT_METHOD_CALL                                         $7, 'format'
         14        SEND_VAL_EX                                              'd+m'
         15        DO_FCALL                                      0  $9      
    5    16        CASE                                                     $9, '25+12'
         17      > JMPNZ                                                    ~10, ->23
    8    18    >   CASE                                                     $9, '14+02'
         19      > JMPNZ                                                    ~10, ->25
   12    20    >   CASE                                                     $9, !0
         21      > JMPNZ                                                    ~10, ->27
         22    > > JMP                                                      ->29
    6    23    >   ECHO                                                     'Merry+Christmas'
    7    24      > JMP                                                      ->30
    9    25    >   ECHO                                                     'Happy+Valentines+Day%21'
   11    26      > JMP                                                      ->30
   13    27    >   ECHO                                                     'Happy+Easter'
   14    28      > JMP                                                      ->30
   16    29    >   ECHO                                                     'No+Holiday+Today'
         30    >   FREE                                                     $9
   17    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.6 ms | 1395 KiB | 13 Q