3v4l.org

run code in 300+ PHP versions simultaneously
<?php $star = '2014-11-02 01:01:01'; $finish = '2014-11-02 03:02:01'; $s = new DateTime($star); $f = new DateTime($finish); $interval = $f->diff($s); echo $interval->format('%H:%I:%S'); 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/QIMNu
function name:  (null)
number of ops:  19
compiled vars:  !0 = $star, !1 = $finish, !2 = $s, !3 = $f, !4 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2014-11-02+01%3A01%3A01'
    4     1        ASSIGN                                                   !1, '2014-11-02+03%3A02%3A01'
    6     2        NEW                                              $7      'DateTime'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $7
    7     6        NEW                                              $10     'DateTime'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !3, $10
    9    10        INIT_METHOD_CALL                                         !3, 'diff'
         11        SEND_VAR_EX                                              !2
         12        DO_FCALL                                      0  $13     
         13        ASSIGN                                                   !4, $13
   10    14        INIT_METHOD_CALL                                         !4, 'format'
         15        SEND_VAL_EX                                              '%25H%3A%25I%3A%25S'
         16        DO_FCALL                                      0  $15     
         17        ECHO                                                     $15
   19    18      > 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/QIMNu
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
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        MOD                                              ~4      !0, 60
          2        ASSIGN                                                   !1, ~4
   13     3        DIV                                              ~6      !0, 3600
          4        CAST                                          4  ~7      ~6
          5        ASSIGN                                                   !2, ~7
   14     6        DIV                                              ~9      !0, 60
          7        CAST                                          4  ~10     ~9
          8        MOD                                              ~11     ~10, 60
          9        ASSIGN                                                   !3, ~11
   15    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
   16    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
   17    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
   18    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
   19    43*     > RETURN                                                   null

End of function sec2date

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.52 ms | 1399 KiB | 13 Q