3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = strtotime($star); $f = strtotime($finish); $e = $f-$s; echo sec2date($e); function sec2date($secs) { $sec = $secs%60; $jam = intval($secs/3600); $menit = intval($secs/60)%60; $sec = ($sec < 10)?"0$sec":"$sec"; $jam = ($jam < 10)?"0$jam":"$jam"; $menit = ($menit < 10) ? "0$menit" : "$menit"; return "$jam:$menit:$sec"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NmDLS
function name:  (null)
number of ops:  15
compiled vars:  !0 = $s, !1 = $star, !2 = $f, !3 = $finish, !4 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAR                                                 !1
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
    4     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAR                                                 !3
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !2, $7
    5     8        SUB                                              ~9      !2, !0
          9        ASSIGN                                                   !4, ~9
    6    10        INIT_FCALL_BY_NAME                                       'sec2date'
         11        SEND_VAR_EX                                              !4
         12        DO_FCALL                                      0  $11     
         13        ECHO                                                     $11
   15    14      > RETURN                                                   1

Function sec2date:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 34
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 34
Branch analysis from position: 30
Branch analysis from position: 34
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
Branch analysis from position: 25
filename:       /in/NmDLS
function name:  sec2date
number of ops:  44
compiled vars:  !0 = $secs, !1 = $sec, !2 = $jam, !3 = $menit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        MOD                                              ~4      !0, 60
          2        ASSIGN                                                   !1, ~4
    9     3        DIV                                              ~6      !0, 3600
          4        CAST                                          4  ~7      ~6
          5        ASSIGN                                                   !2, ~7
   10     6        DIV                                              ~9      !0, 60
          7        CAST                                          4  ~10     ~9
          8        MOD                                              ~11     ~10, 60
          9        ASSIGN                                                   !3, ~11
   11    10        IS_SMALLER                                               !1, 10
         11      > JMPZ                                                     ~13, ->16
         12    >   NOP                                                      
         13        FAST_CONCAT                                      ~14     '0', !1
         14        QM_ASSIGN                                        ~15     ~14
         15      > JMP                                                      ->18
         16    >   CAST                                          6  ~16     !1
         17        QM_ASSIGN                                        ~15     ~16
         18    >   ASSIGN                                                   !1, ~15
   12    19        IS_SMALLER                                               !2, 10
         20      > JMPZ                                                     ~18, ->25
         21    >   NOP                                                      
         22        FAST_CONCAT                                      ~19     '0', !2
         23        QM_ASSIGN                                        ~20     ~19
         24      > JMP                                                      ->27
         25    >   CAST                                          6  ~21     !2
         26        QM_ASSIGN                                        ~20     ~21
         27    >   ASSIGN                                                   !2, ~20
   13    28        IS_SMALLER                                               !3, 10
         29      > JMPZ                                                     ~23, ->34
         30    >   NOP                                                      
         31        FAST_CONCAT                                      ~24     '0', !3
         32        QM_ASSIGN                                        ~25     ~24
         33      > JMP                                                      ->36
         34    >   CAST                                          6  ~26     !3
         35        QM_ASSIGN                                        ~25     ~26
         36    >   ASSIGN                                                   !3, ~25
   14    37        ROPE_INIT                                     5  ~29     !2
         38        ROPE_ADD                                      1  ~29     ~29, '%3A'
         39        ROPE_ADD                                      2  ~29     ~29, !3
         40        ROPE_ADD                                      3  ~29     ~29, '%3A'
         41        ROPE_END                                      4  ~28     ~29, !1
         42      > RETURN                                                   ~28
   15    43*     > RETURN                                                   null

End of function sec2date

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.6 ms | 1400 KiB | 15 Q