3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.55 ms | 1395 KiB | 20 Q