3v4l.org

run code in 300+ PHP versions simultaneously
<?php function convertTime($starttime){ $time = time() - $starttime; $mins = floor($time / 60); $hours = floor($mins / 60); $mins -= ($hours * 60); return ($hours > 0) ? $hours."hrs, ".$mins."mins" : $mins."mins"; } echo convertTime(1412373028);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O1BLi
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'converttime'
          1        SEND_VAL                                                 1412373028
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function converttime:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O1BLi
function name:  convertTime
number of ops:  28
compiled vars:  !0 = $starttime, !1 = $time, !2 = $mins, !3 = $hours
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'time'
          2        DO_ICALL                                         $4      
          3        SUB                                              ~5      $4, !0
          4        ASSIGN                                                   !1, ~5
    6     5        INIT_FCALL                                               'floor'
          6        DIV                                              ~7      !1, 60
          7        SEND_VAL                                                 ~7
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !2, $8
    7    10        INIT_FCALL                                               'floor'
         11        DIV                                              ~10     !2, 60
         12        SEND_VAL                                                 ~10
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !3, $11
    8    15        MUL                                              ~13     !3, 60
         16        ASSIGN_OP                                     2          !2, ~13
    9    17        IS_SMALLER                                               0, !3
         18      > JMPZ                                                     ~15, ->24
         19    >   CONCAT                                           ~16     !3, 'hrs%2C+'
         20        CONCAT                                           ~17     ~16, !2
         21        CONCAT                                           ~18     ~17, 'mins'
         22        QM_ASSIGN                                        ~19     ~18
         23      > JMP                                                      ->26
         24    >   CONCAT                                           ~20     !2, 'mins'
         25        QM_ASSIGN                                        ~19     ~20
         26    > > RETURN                                                   ~19
   10    27*     > RETURN                                                   null

End of function converttime

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.06 ms | 1399 KiB | 18 Q