3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.4 ms | 1395 KiB | 17 Q