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] / 10)); } else { $hours = $number; } return $hours.":".$minutes.":".$seconds; } echo Number2Date(48.0); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNZbM
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'number2date'
          1        SEND_VAL                                                 48
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   17     4      > RETURN                                                   1

Function number2date:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 24
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNZbM
function name:  Number2Date
number of ops:  31
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_VAR                                                 !0
          6        SEND_VAL                                                 '.'
          7        DO_ICALL                                         $8      
          8      > JMPZ                                                     $8, ->24
    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        DIV                                              ~14     ~13, 10
         19        MUL                                              ~15     ~14, 60
         20        SEND_VAL                                                 ~15
         21        DO_ICALL                                         $16     
         22        ASSIGN                                                   !2, $16
         23      > JMP                                                      ->25
   11    24    >   ASSIGN                                                   !3, !0
   13    25    >   CONCAT                                           ~19     !3, '%3A'
         26        CONCAT                                           ~20     ~19, !2
         27        CONCAT                                           ~21     ~20, '%3A'
         28        CONCAT                                           ~22     ~21, !1
         29      > RETURN                                                   ~22
   14    30*     > RETURN                                                   null

End of function number2date

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.03 ms | 1399 KiB | 20 Q