3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=1000; do { $a = bcdiv('27182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274', --$i, 2); echo $a; } while (strpos($a, '.') >= 0 && $i > 1); echo $i;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 1
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 1
Branch analysis from position: 17
filename:       /in/bmdKP
function name:  (null)
number of ops:  20
compiled vars:  !0 = $i, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1000
    5     1    >   INIT_FCALL_BY_NAME                                       'bcdiv'
          2        SEND_VAL_EX                                              '27182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274'
          3        PRE_DEC                                          ~3      !0
          4        SEND_VAL_EX                                              ~3
          5        SEND_VAL_EX                                              2
          6        DO_FCALL                                      0  $4      
          7        ASSIGN                                                   !1, $4
    6     8        ECHO                                                     !1
    7     9        INIT_FCALL                                               'strpos'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 '.'
         12        DO_ICALL                                         $6      
         13        IS_SMALLER_OR_EQUAL                              ~7      0, $6
         14      > JMPZ_EX                                          ~7      ~7, ->17
         15    >   IS_SMALLER                                       ~8      1, !0
         16        BOOL                                             ~7      ~8
         17    > > JMPNZ                                                    ~7, ->1
    9    18    >   ECHO                                                     !0
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.97 ms | 1395 KiB | 18 Q