3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.51 ms | 1395 KiB | 19 Q