3v4l.org

run code in 300+ PHP versions simultaneously
<?php $seconds = 2434; $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); } else {$hours = strval($h);} } if ($m > 0){ if (strlen(strval($m)) == 1){ $minutes = '0'.strval($m); } else {$minutes = strval($m);} } if ($s > 0){ if (strlen(strval($s)) == 1){ $seconds = '0'.strval($s); } else {$seconds = strval($s);} } $time = $hours.":".$minutes.":".$seconds; echo "\$h: ", $h, " \n"; echo "\$m: ", $m, " \n"; echo "\$s: ", $s, " \n"; echo $time;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 24
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 36
Branch analysis from position: 26
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
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 48
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 46
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 48
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 48
Branch analysis from position: 38
Branch analysis from position: 48
Branch analysis from position: 36
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 36
Branch analysis from position: 26
Branch analysis from position: 36
Branch analysis from position: 24
filename:       /in/c98uO
function name:  (null)
number of ops:  64
compiled vars:  !0 = $seconds, !1 = $h, !2 = $m, !3 = $s, !4 = $hours, !5 = $minutes, !6 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 2434
    3     1        DIV                                              ~8      !0, 3600
          2        MOD                                              ~9      ~8, 24
          3        ASSIGN                                                   !1, ~9
    4     4        DIV                                              ~11     !0, 60
          5        MOD                                              ~12     ~11, 60
          6        ASSIGN                                                   !2, ~12
    5     7        MOD                                              ~14     !0, 60
          8        ASSIGN                                                   !3, ~14
    6     9        ASSIGN                                                   !4, '00'
    7    10        ASSIGN                                                   !5, '00'
    8    11        ASSIGN                                                   !0, '00'
    9    12        IS_SMALLER                                               0, !1
         13      > JMPZ                                                     ~19, ->24
   10    14    >   CAST                                          6  ~20     !1
         15        STRLEN                                           ~21     ~20
         16        IS_EQUAL                                                 ~21, 1
         17      > JMPZ                                                     ~22, ->22
   11    18    >   CAST                                          6  ~23     !1
         19        CONCAT                                           ~24     '0', ~23
         20        ASSIGN                                                   !4, ~24
         21      > JMP                                                      ->24
   13    22    >   CAST                                          6  ~26     !1
         23        ASSIGN                                                   !4, ~26
   15    24    >   IS_SMALLER                                               0, !2
         25      > JMPZ                                                     ~28, ->36
   16    26    >   CAST                                          6  ~29     !2
         27        STRLEN                                           ~30     ~29
         28        IS_EQUAL                                                 ~30, 1
         29      > JMPZ                                                     ~31, ->34
   17    30    >   CAST                                          6  ~32     !2
         31        CONCAT                                           ~33     '0', ~32
         32        ASSIGN                                                   !5, ~33
         33      > JMP                                                      ->36
   19    34    >   CAST                                          6  ~35     !2
         35        ASSIGN                                                   !5, ~35
   21    36    >   IS_SMALLER                                               0, !3
         37      > JMPZ                                                     ~37, ->48
   22    38    >   CAST                                          6  ~38     !3
         39        STRLEN                                           ~39     ~38
         40        IS_EQUAL                                                 ~39, 1
         41      > JMPZ                                                     ~40, ->46
   23    42    >   CAST                                          6  ~41     !3
         43        CONCAT                                           ~42     '0', ~41
         44        ASSIGN                                                   !0, ~42
         45      > JMP                                                      ->48
   25    46    >   CAST                                          6  ~44     !3
         47        ASSIGN                                                   !0, ~44
   29    48    >   CONCAT                                           ~46     !4, '%3A'
         49        CONCAT                                           ~47     ~46, !5
         50        CONCAT                                           ~48     ~47, '%3A'
         51        CONCAT                                           ~49     ~48, !0
         52        ASSIGN                                                   !6, ~49
   30    53        ECHO                                                     '%24h%3A+'
         54        ECHO                                                     !1
         55        ECHO                                                     '+%0A'
   31    56        ECHO                                                     '%24m%3A+'
         57        ECHO                                                     !2
         58        ECHO                                                     '+%0A'
   32    59        ECHO                                                     '%24s%3A+'
         60        ECHO                                                     !3
         61        ECHO                                                     '+%0A'
   33    62        ECHO                                                     !6
         63      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.28 ms | 1399 KiB | 13 Q