3v4l.org

run code in 300+ PHP versions simultaneously
<?php $seconds = 2; $h = $seconds / 3600 % 24; $m = $seconds / 60 % 60; $s = $seconds % 60; $hours = 00; $minutes = 00; $seconds = 00; if ($h > 0){ if (strlen(strval($h)) == 1){ $hours = '0'.strval($h); } } if ($m > 0){ if (strlen(strval($m)) == 1){ $minutes = '0'.strval($m); } } if ($s > 0){ if (strlen(strval($s)) == 1){ $seconds = '0'.strval($s); } } $time = $hour.$minute.$second; echo $time;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 21
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 30
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 39
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 39
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 39
Branch analysis from position: 30
Branch analysis from position: 30
Branch analysis from position: 21
Branch analysis from position: 21
filename:       /in/pgd7d
function name:  (null)
number of ops:  44
compiled vars:  !0 = $seconds, !1 = $h, !2 = $m, !3 = $s, !4 = $hours, !5 = $minutes, !6 = $time, !7 = $hour, !8 = $minute, !9 = $second
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 2
    3     1        DIV                                              ~11     !0, 3600
          2        MOD                                              ~12     ~11, 24
          3        ASSIGN                                                   !1, ~12
    4     4        DIV                                              ~14     !0, 60
          5        MOD                                              ~15     ~14, 60
          6        ASSIGN                                                   !2, ~15
    5     7        MOD                                              ~17     !0, 60
          8        ASSIGN                                                   !3, ~17
    6     9        ASSIGN                                                   !4, 0
    7    10        ASSIGN                                                   !5, 0
    8    11        ASSIGN                                                   !0, 0
    9    12        IS_SMALLER                                               0, !1
         13      > JMPZ                                                     ~22, ->21
   10    14    >   CAST                                          6  ~23     !1
         15        STRLEN                                           ~24     ~23
         16        IS_EQUAL                                                 ~24, 1
         17      > JMPZ                                                     ~25, ->21
   11    18    >   CAST                                          6  ~26     !1
         19        CONCAT                                           ~27     '0', ~26
         20        ASSIGN                                                   !4, ~27
   14    21    >   IS_SMALLER                                               0, !2
         22      > JMPZ                                                     ~29, ->30
   15    23    >   CAST                                          6  ~30     !2
         24        STRLEN                                           ~31     ~30
         25        IS_EQUAL                                                 ~31, 1
         26      > JMPZ                                                     ~32, ->30
   16    27    >   CAST                                          6  ~33     !2
         28        CONCAT                                           ~34     '0', ~33
         29        ASSIGN                                                   !5, ~34
   19    30    >   IS_SMALLER                                               0, !3
         31      > JMPZ                                                     ~36, ->39
   20    32    >   CAST                                          6  ~37     !3
         33        STRLEN                                           ~38     ~37
         34        IS_EQUAL                                                 ~38, 1
         35      > JMPZ                                                     ~39, ->39
   21    36    >   CAST                                          6  ~40     !3
         37        CONCAT                                           ~41     '0', ~40
         38        ASSIGN                                                   !0, ~41
   26    39    >   CONCAT                                           ~43     !7, !8
         40        CONCAT                                           ~44     ~43, !9
         41        ASSIGN                                                   !6, ~44
   27    42        ECHO                                                     !6
         43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.29 ms | 1390 KiB | 13 Q