3v4l.org

run code in 300+ PHP versions simultaneously
<?php $seconds = 2; $h = $seconds / 3600 % 24; $m = $seconds / 60 % 60; $s = $seconds % 60; $output = array(); if ($h >= 1) $output[] = "{$h} ".($h == 1 ? i18n::get('hour') : i18n::get('hours')); if ($m >= 1) $output[] = "{$m} ".($m == 1 ? i18n::get('minute') : i18n::get('minutes')); if ($s >= 1) $output[] = "{$s} ".($s == 1 ? i18n::get('second') : i18n::get('seconds')); echo implode(', ', $output);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 28
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 46
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 39
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 64
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 57
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 61
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 57
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 64
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 64
Branch analysis from position: 48
Branch analysis from position: 64
Branch analysis from position: 46
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 46
Branch analysis from position: 30
Branch analysis from position: 46
Branch analysis from position: 28
filename:       /in/d7E1I
function name:  (null)
number of ops:  70
compiled vars:  !0 = $seconds, !1 = $h, !2 = $m, !3 = $s, !4 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 2
    3     1        DIV                                              ~6      !0, 3600
          2        MOD                                              ~7      ~6, 24
          3        ASSIGN                                                   !1, ~7
    4     4        DIV                                              ~9      !0, 60
          5        MOD                                              ~10     ~9, 60
          6        ASSIGN                                                   !2, ~10
    5     7        MOD                                              ~12     !0, 60
          8        ASSIGN                                                   !3, ~12
    6     9        ASSIGN                                                   !4, <array>
    8    10        IS_SMALLER_OR_EQUAL                                      1, !1
         11      > JMPZ                                                     ~15, ->28
         12    >   NOP                                                      
         13        FAST_CONCAT                                      ~17     !1, '+'
         14        IS_EQUAL                                                 !1, 1
         15      > JMPZ                                                     ~18, ->21
         16    >   INIT_STATIC_METHOD_CALL                                  'i18n', 'get'
         17        SEND_VAL_EX                                              'hour'
         18        DO_FCALL                                      0  $19     
         19        QM_ASSIGN                                        ~20     $19
         20      > JMP                                                      ->25
         21    >   INIT_STATIC_METHOD_CALL                                  'i18n', 'get'
         22        SEND_VAL_EX                                              'hours'
         23        DO_FCALL                                      0  $21     
         24        QM_ASSIGN                                        ~20     $21
         25    >   CONCAT                                           ~22     ~17, ~20
         26        ASSIGN_DIM                                               !4
         27        OP_DATA                                                  ~22
    9    28    >   IS_SMALLER_OR_EQUAL                                      1, !2
         29      > JMPZ                                                     ~23, ->46
         30    >   NOP                                                      
         31        FAST_CONCAT                                      ~25     !2, '+'
         32        IS_EQUAL                                                 !2, 1
         33      > JMPZ                                                     ~26, ->39
         34    >   INIT_STATIC_METHOD_CALL                                  'i18n', 'get'
         35        SEND_VAL_EX                                              'minute'
         36        DO_FCALL                                      0  $27     
         37        QM_ASSIGN                                        ~28     $27
         38      > JMP                                                      ->43
         39    >   INIT_STATIC_METHOD_CALL                                  'i18n', 'get'
         40        SEND_VAL_EX                                              'minutes'
         41        DO_FCALL                                      0  $29     
         42        QM_ASSIGN                                        ~28     $29
         43    >   CONCAT                                           ~30     ~25, ~28
         44        ASSIGN_DIM                                               !4
         45        OP_DATA                                                  ~30
   10    46    >   IS_SMALLER_OR_EQUAL                                      1, !3
         47      > JMPZ                                                     ~31, ->64
         48    >   NOP                                                      
         49        FAST_CONCAT                                      ~33     !3, '+'
         50        IS_EQUAL                                                 !3, 1
         51      > JMPZ                                                     ~34, ->57
         52    >   INIT_STATIC_METHOD_CALL                                  'i18n', 'get'
         53        SEND_VAL_EX                                              'second'
         54        DO_FCALL                                      0  $35     
         55        QM_ASSIGN                                        ~36     $35
         56      > JMP                                                      ->61
         57    >   INIT_STATIC_METHOD_CALL                                  'i18n', 'get'
         58        SEND_VAL_EX                                              'seconds'
         59        DO_FCALL                                      0  $37     
         60        QM_ASSIGN                                        ~36     $37
         61    >   CONCAT                                           ~38     ~33, ~36
         62        ASSIGN_DIM                                               !4
         63        OP_DATA                                                  ~38
   11    64    >   INIT_FCALL                                               'implode'
         65        SEND_VAL                                                 '%2C+'
         66        SEND_VAR                                                 !4
         67        DO_ICALL                                         $39     
         68        ECHO                                                     $39
         69      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.43 ms | 1400 KiB | 15 Q