3v4l.org

run code in 300+ PHP versions simultaneously
<?php $seconds_input = (int) 63; $hours = floor($seconds_input / 3600); $minutes = floor(($seconds_input / 60) % 60); $seconds = $seconds_input % 60; printf("%02d:%02d:%02d", $hours, $minutes, $seconds); echo "\n"; echo gmdate('H:i:s', $seconds_input);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cHmrP
function name:  (null)
number of ops:  28
compiled vars:  !0 = $seconds_input, !1 = $hours, !2 = $minutes, !3 = $seconds
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          4  ~4      63
          1        ASSIGN                                                   !0, ~4
    5     2        INIT_FCALL                                               'floor'
          3        DIV                                              ~6      !0, 3600
          4        SEND_VAL                                                 ~6
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !1, $7
    6     7        INIT_FCALL                                               'floor'
          8        DIV                                              ~9      !0, 60
          9        MOD                                              ~10     ~9, 60
         10        SEND_VAL                                                 ~10
         11        DO_ICALL                                         $11     
         12        ASSIGN                                                   !2, $11
    7    13        MOD                                              ~13     !0, 60
         14        ASSIGN                                                   !3, ~13
    9    15        INIT_FCALL                                               'printf'
         16        SEND_VAL                                                 '%2502d%3A%2502d%3A%2502d'
         17        SEND_VAR                                                 !1
         18        SEND_VAR                                                 !2
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                                 
   10    21        ECHO                                                     '%0A'
   11    22        INIT_FCALL                                               'gmdate'
         23        SEND_VAL                                                 'H%3Ai%3As'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $16     
         26        ECHO                                                     $16
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.06 ms | 1387 KiB | 19 Q