3v4l.org

run code in 300+ PHP versions simultaneously
<?php $seconds_in_hour = 60 * 60; $seconds_in_day = $seconds_in_hour * 24; $epoch = time(); $current_hour = $epoch % $seconds_in_day / $seconds_in_hour; echo $current_hour; if ($current_hour > 12) { $time_prefix = "pm"; } else { $time_prefix = "am"; $current_hour -= 12; } echo $current_hour; echo $time_prefix; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nC9dH
function name:  (null)
number of ops:  19
compiled vars:  !0 = $seconds_in_hour, !1 = $seconds_in_day, !2 = $epoch, !3 = $current_hour, !4 = $time_prefix
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 3600
    3     1        MUL                                              ~6      !0, 24
          2        ASSIGN                                                   !1, ~6
    4     3        INIT_FCALL                                               'time'
          4        DO_ICALL                                         $8      
          5        ASSIGN                                                   !2, $8
    5     6        MOD                                              ~10     !2, !1
          7        DIV                                              ~11     ~10, !0
          8        ASSIGN                                                   !3, ~11
    6     9        ECHO                                                     !3
    7    10        IS_SMALLER                                               12, !3
         11      > JMPZ                                                     ~13, ->14
    8    12    >   ASSIGN                                                   !4, 'pm'
         13      > JMP                                                      ->16
   10    14    >   ASSIGN                                                   !4, 'am'
   11    15        ASSIGN_OP                                     2          !3, 12
   13    16    >   ECHO                                                     !3
   14    17        ECHO                                                     !4
   15    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.59 ms | 1395 KiB | 15 Q