3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = time(); $l = 10; foreach(array(2,8,10,16) as $base) echo str_pad(base_convert($t, 10, $base), $l).PHP_EOL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 18
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/hPnDe
function name:  (null)
number of ops:  20
compiled vars:  !0 = $t, !1 = $l, !2 = $base
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'time'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    3     3        ASSIGN                                                   !1, 10
    4     4      > FE_RESET_R                                       $6      <array>, ->18
          5    > > FE_FETCH_R                                               $6, !2, ->18
    5     6    >   INIT_FCALL                                               'str_pad'
          7        INIT_FCALL                                               'base_convert'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 10
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $8      
         15        CONCAT                                           ~9      $8, '%0A'
         16        ECHO                                                     ~9
    4    17      > JMP                                                      ->5
         18    >   FE_FREE                                                  $6
    5    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.03 ms | 1395 KiB | 19 Q