3v4l.org

run code in 300+ PHP versions simultaneously
<?php function maxBit() { list($return, $number) = array(0, 0); // Start process while (true) { // Get number at x bits $numX = intval(bcsub(bcpow('2', "{$return}"), '1')); // Check number if ($numX != 0 && $number == $numX) { break; } // Update number $number = $numX; // Update return value $return++; } return $return; } echo maxBit();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JA4Dd
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'maxbit'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function maxbit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 5
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 5
Branch analysis from position: 25
Branch analysis from position: 5
Branch analysis from position: 20
filename:       /in/JA4Dd
function name:  maxBit
number of ops:  27
compiled vars:  !0 = $return, !1 = $number, !2 = $numX
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_LIST_R                                     $3      <array>, 0
          1        ASSIGN                                                   !0, $3
          2        FETCH_LIST_R                                     $5      <array>, 1
          3        ASSIGN                                                   !1, $5
    8     4      > JMP                                                      ->24
   10     5    >   INIT_FCALL_BY_NAME                                       'bcsub'
          6        INIT_FCALL_BY_NAME                                       'bcpow'
          7        SEND_VAL_EX                                              '2'
          8        CAST                                          6  ~7      !0
          9        SEND_VAL_EX                                              ~7
         10        DO_FCALL                                      0  $8      
         11        SEND_VAR_NO_REF_EX                                       $8
         12        SEND_VAL_EX                                              '1'
         13        DO_FCALL                                      0  $9      
         14        CAST                                          4  ~10     $9
         15        ASSIGN                                                   !2, ~10
   12    16        IS_NOT_EQUAL                                     ~12     !2, 0
         17      > JMPZ_EX                                          ~12     ~12, ->20
         18    >   IS_EQUAL                                         ~13     !1, !2
         19        BOOL                                             ~12     ~13
         20    > > JMPZ                                                     ~12, ->22
   13    21    > > JMP                                                      ->25
   16    22    >   ASSIGN                                                   !1, !2
   18    23        PRE_INC                                                  !0
    8    24    > > JMPNZ                                                    <true>, ->5
   21    25    > > RETURN                                                   !0
   22    26*     > RETURN                                                   null

End of function maxbit

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.63 ms | 1398 KiB | 20 Q