3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n=3618;$rev=0; while($n!=0) { $rem=$n%2; $rev=$rev*10+$rem; $n=$n/1; } echo 'reverse of no is:'; echo $rev; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
Branch analysis from position: 3
filename:       /in/VC7vi
function name:  (null)
number of ops:  15
compiled vars:  !0 = $n, !1 = $rev, !2 = $rem
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 3618
          1        ASSIGN                                                   !1, 0
    3     2      > JMP                                                      ->10
    5     3    >   MOD                                              ~5      !0, 2
          4        ASSIGN                                                   !2, ~5
    6     5        MUL                                              ~7      !1, 10
          6        ADD                                              ~8      ~7, !2
          7        ASSIGN                                                   !1, ~8
    7     8        DIV                                              ~10     !0, 1
          9        ASSIGN                                                   !0, ~10
    3    10    >   IS_NOT_EQUAL                                             !0, 0
         11      > JMPNZ                                                    ~12, ->3
    9    12    >   ECHO                                                     'reverse+of+no+is%3A'
   10    13        ECHO                                                     !1
   11    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.01 ms | 1397 KiB | 13 Q