3v4l.org

run code in 300+ PHP versions simultaneously
<?php function Number2Date($number) { $seconds = '00'; $minutes = '00'; $hours = '00'; if(strpos('.', $number)) { $arr = explode(".", $number); $hours = $arr[0]; $minutes = round(60 * $arr[1]); } else { $hours = $number; } return $hours.":".$minutes.":".$seconds; } echo Number2Date(48.5); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4T7Lo
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'number2date'
          1        SEND_VAL                                                 48.5
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   16     4      > RETURN                                                   1

Function number2date:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 23
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4T7Lo
function name:  Number2Date
number of ops:  30
compiled vars:  !0 = $number, !1 = $seconds, !2 = $minutes, !3 = $hours, !4 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, '00'
    4     2        ASSIGN                                                   !2, '00'
    5     3        ASSIGN                                                   !3, '00'
    6     4        INIT_FCALL                                               'strpos'
          5        SEND_VAL                                                 '.'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $8      
          8      > JMPZ                                                     $8, ->23
    7     9    >   INIT_FCALL                                               'explode'
         10        SEND_VAL                                                 '.'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !4, $9
    8    14        FETCH_DIM_R                                      ~11     !4, 0
         15        ASSIGN                                                   !3, ~11
    9    16        INIT_FCALL                                               'round'
         17        FETCH_DIM_R                                      ~13     !4, 1
         18        MUL                                              ~14     ~13, 60
         19        SEND_VAL                                                 ~14
         20        DO_ICALL                                         $15     
         21        ASSIGN                                                   !2, $15
         22      > JMP                                                      ->24
   11    23    >   ASSIGN                                                   !3, !0
   13    24    >   CONCAT                                           ~18     !3, '%3A'
         25        CONCAT                                           ~19     ~18, !2
         26        CONCAT                                           ~20     ~19, '%3A'
         27        CONCAT                                           ~21     ~20, !1
         28      > RETURN                                                   ~21
   14    29*     > RETURN                                                   null

End of function number2date

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.67 ms | 1398 KiB | 20 Q