3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v = '9223372036854775807'; echo $v % 6 . PHP_EOL; while (strlen($v) > 9) { $short = substr($v, 0, 9); $prefix = (int)$short % 6; $v = $prefix . substr($v, 9); echo "SHORT: ". $short . " PREFIX: ". $prefix . " NUMBER: ". $v . PHP_EOL; } echo $v % 6;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 5
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 5
Branch analysis from position: 30
Branch analysis from position: 5
filename:       /in/JlPW8
function name:  (null)
number of ops:  33
compiled vars:  !0 = $v, !1 = $short, !2 = $prefix
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '9223372036854775807'
    5     1        MOD                                              ~4      !0, 6
          2        CONCAT                                           ~5      ~4, '%0A'
          3        ECHO                                                     ~5
    7     4      > JMP                                                      ->27
    9     5    >   INIT_FCALL                                               'substr'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 0
          8        SEND_VAL                                                 9
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !1, $6
   11    11        CAST                                          4  ~8      !1
         12        MOD                                              ~9      ~8, 6
         13        ASSIGN                                                   !2, ~9
   13    14        INIT_FCALL                                               'substr'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 9
         17        DO_ICALL                                         $11     
         18        CONCAT                                           ~12     !2, $11
         19        ASSIGN                                                   !0, ~12
   15    20        CONCAT                                           ~14     'SHORT%3A+', !1
         21        CONCAT                                           ~15     ~14, '++PREFIX%3A+'
         22        CONCAT                                           ~16     ~15, !2
         23        CONCAT                                           ~17     ~16, '+NUMBER%3A+'
         24        CONCAT                                           ~18     ~17, !0
         25        CONCAT                                           ~19     ~18, '%0A'
         26        ECHO                                                     ~19
    7    27    >   STRLEN                                           ~20     !0
         28        IS_SMALLER                                               9, ~20
         29      > JMPNZ                                                    ~21, ->5
   18    30    >   MOD                                              ~22     !0, 6
         31        ECHO                                                     ~22
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.46 ms | 1396 KiB | 15 Q