3v4l.org

run code in 300+ PHP versions simultaneously
<?php $amount = 10000000; $amount = number_format($amount,0,'',''); if($amount < 1) { return 0; } if($intowords) { $price = get_auction_price_words($amount); if(!empty($price)) { return $price; } } $number_sep = array(); $multi = 1; $exit = false; $i = 1000; for($j=3;$j < 15 ;$j=$j+2) { switch($j) { case 3: $temp = ($amount/$i);$temp = round(($temp - floor($temp)) * 1000,2); if($i < $amount) { if(!$temp) { $number_sep[] = '000'; } else { $amount = $amount - $temp; $number_sep[] = str_pad(round($temp,2),3,'0',STR_PAD_LEFT); } } else { if(!$temp) { $number_sep[] = $i; } else { $number_sep[] = round($temp,2); } $exit = true; } break; case $j > 3 : $temp = $amount % $i; if($i < $amount) { if(!$temp) { $number_sep[] = '00'; } else { $amount = $amount - $temp; $number_sep[] = str_pad(round($temp/($i/100)),2,'0',STR_PAD_LEFT); } } else { if(!$temp) { $number_sep[] = '00'; } else { $number_sep[] = round($temp/($i/100)); } $exit = true; }; break; } if($exit) { break; } $i = 10 * 10 * $i; } echo $i;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 124
Branch analysis from position: 124
2 jumps found. (Code = 44) Position 1 = 126, Position 2 = 26
Branch analysis from position: 126
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 79
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 118
Branch analysis from position: 118
2 jumps found. (Code = 43) Position 1 = 119, Position 2 = 120
Branch analysis from position: 119
1 jumps found. (Code = 42) Position 1 = 126
Branch analysis from position: 126
Branch analysis from position: 120
2 jumps found. (Code = 44) Position 1 = 126, Position 2 = 26
Branch analysis from position: 126
Branch analysis from position: 26
Branch analysis from position: 79
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 104
Branch analysis from position: 83
2 jumps found. (Code = 43) Position 1 = 85, Position 2 = 88
Branch analysis from position: 85
1 jumps found. (Code = 42) Position 1 = 103
Branch analysis from position: 103
1 jumps found. (Code = 42) Position 1 = 117
Branch analysis from position: 117
1 jumps found. (Code = 42) Position 1 = 118
Branch analysis from position: 118
Branch analysis from position: 88
1 jumps found. (Code = 42) Position 1 = 117
Branch analysis from position: 117
Branch analysis from position: 104
2 jumps found. (Code = 43) Position 1 = 106, Position 2 = 109
Branch analysis from position: 106
1 jumps found. (Code = 42) Position 1 = 116
Branch analysis from position: 116
1 jumps found. (Code = 42) Position 1 = 118
Branch analysis from position: 118
Branch analysis from position: 109
1 jumps found. (Code = 42) Position 1 = 118
Branch analysis from position: 118
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 66
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 51
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 65
Branch analysis from position: 65
1 jumps found. (Code = 42) Position 1 = 78
Branch analysis from position: 78
1 jumps found. (Code = 42) Position 1 = 118
Branch analysis from position: 118
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 78
Branch analysis from position: 78
Branch analysis from position: 66
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 71
Branch analysis from position: 68
1 jumps found. (Code = 42) Position 1 = 77
Branch analysis from position: 77
1 jumps found. (Code = 42) Position 1 = 118
Branch analysis from position: 118
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 118
Branch analysis from position: 118
Branch analysis from position: 20
filename:       /in/f7Rmj
function name:  (null)
number of ops:  128
compiled vars:  !0 = $amount, !1 = $intowords, !2 = $price, !3 = $number_sep, !4 = $multi, !5 = $exit, !6 = $i, !7 = $j, !8 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10000000
    3     1        INIT_FCALL                                               'number_format'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 ''
          5        SEND_VAL                                                 ''
          6        DO_ICALL                                         $10     
          7        ASSIGN                                                   !0, $10
    4     8        IS_SMALLER                                               !0, 1
          9      > JMPZ                                                     ~12, ->11
    5    10    > > RETURN                                                   0
    7    11    > > JMPZ                                                     !1, ->20
    8    12    >   INIT_FCALL_BY_NAME                                       'get_auction_price_words'
         13        SEND_VAR_EX                                              !0
         14        DO_FCALL                                      0  $13     
         15        ASSIGN                                                   !2, $13
    9    16        ISSET_ISEMPTY_CV                                 ~15     !2
         17        BOOL_NOT                                         ~16     ~15
         18      > JMPZ                                                     ~16, ->20
   10    19    > > RETURN                                                   !2
   13    20    >   ASSIGN                                                   !3, <array>
   14    21        ASSIGN                                                   !4, 1
   15    22        ASSIGN                                                   !5, <false>
   16    23        ASSIGN                                                   !6, 1000
   17    24        ASSIGN                                                   !7, 3
         25      > JMP                                                      ->124
   20    26    >   IS_EQUAL                                                 !7, 3
         27      > JMPNZ                                                    ~22, ->32
   37    28    >   IS_SMALLER                                       ~23     3, !7
         29        IS_EQUAL                                                 !7, ~23
         30      > JMPNZ                                                    ~22, ->79
         31    > > JMP                                                      ->118
   20    32    >   DIV                                              ~24     !0, !6
         33        ASSIGN                                                   !8, ~24
         34        INIT_FCALL                                               'round'
         35        INIT_FCALL                                               'floor'
         36        SEND_VAR                                                 !8
         37        DO_ICALL                                         $26     
         38        SUB                                              ~27     !8, $26
         39        MUL                                              ~28     ~27, 1000
         40        SEND_VAL                                                 ~28
         41        SEND_VAL                                                 2
         42        DO_ICALL                                         $29     
         43        ASSIGN                                                   !8, $29
   21    44        IS_SMALLER                                               !6, !0
         45      > JMPZ                                                     ~31, ->66
   22    46    >   BOOL_NOT                                         ~32     !8
         47      > JMPZ                                                     ~32, ->51
   23    48    >   ASSIGN_DIM                                               !3
         49        OP_DATA                                                  '000'
         50      > JMP                                                      ->65
   25    51    >   SUB                                              ~34     !0, !8
         52        ASSIGN                                                   !0, ~34
   26    53        INIT_FCALL                                               'str_pad'
         54        INIT_FCALL                                               'round'
         55        SEND_VAR                                                 !8
         56        SEND_VAL                                                 2
         57        DO_ICALL                                         $37     
         58        SEND_VAR                                                 $37
         59        SEND_VAL                                                 3
         60        SEND_VAL                                                 '0'
         61        SEND_VAL                                                 0
         62        DO_ICALL                                         $38     
         63        ASSIGN_DIM                                               !3
         64        OP_DATA                                                  $38
         65    > > JMP                                                      ->78
   29    66    >   BOOL_NOT                                         ~39     !8
         67      > JMPZ                                                     ~39, ->71
   30    68    >   ASSIGN_DIM                                               !3
         69        OP_DATA                                                  !6
         70      > JMP                                                      ->77
   32    71    >   INIT_FCALL                                               'round'
         72        SEND_VAR                                                 !8
         73        SEND_VAL                                                 2
         74        DO_ICALL                                         $42     
         75        ASSIGN_DIM                                               !3
         76        OP_DATA                                                  $42
   34    77    >   ASSIGN                                                   !5, <true>
   36    78    > > JMP                                                      ->118
   37    79    >   MOD                                              ~44     !0, !6
         80        ASSIGN                                                   !8, ~44
   39    81        IS_SMALLER                                               !6, !0
         82      > JMPZ                                                     ~46, ->104
   40    83    >   BOOL_NOT                                         ~47     !8
         84      > JMPZ                                                     ~47, ->88
   41    85    >   ASSIGN_DIM                                               !3
         86        OP_DATA                                                  '00'
         87      > JMP                                                      ->103
   43    88    >   SUB                                              ~49     !0, !8
         89        ASSIGN                                                   !0, ~49
   44    90        INIT_FCALL                                               'str_pad'
         91        INIT_FCALL                                               'round'
         92        DIV                                              ~52     !6, 100
         93        DIV                                              ~53     !8, ~52
         94        SEND_VAL                                                 ~53
         95        DO_ICALL                                         $54     
         96        SEND_VAR                                                 $54
         97        SEND_VAL                                                 2
         98        SEND_VAL                                                 '0'
         99        SEND_VAL                                                 0
        100        DO_ICALL                                         $55     
        101        ASSIGN_DIM                                               !3
        102        OP_DATA                                                  $55
        103    > > JMP                                                      ->117
   47   104    >   BOOL_NOT                                         ~56     !8
        105      > JMPZ                                                     ~56, ->109
   48   106    >   ASSIGN_DIM                                               !3
        107        OP_DATA                                                  '00'
        108      > JMP                                                      ->116
   50   109    >   INIT_FCALL                                               'round'
        110        DIV                                              ~59     !6, 100
        111        DIV                                              ~60     !8, ~59
        112        SEND_VAL                                                 ~60
        113        DO_ICALL                                         $61     
        114        ASSIGN_DIM                                               !3
        115        OP_DATA                                                  $61
   52   116    >   ASSIGN                                                   !5, <true>
   54   117    > > JMP                                                      ->118
   57   118    > > JMPZ                                                     !5, ->120
   58   119    > > JMP                                                      ->126
   60   120    >   MUL                                              ~63     !6, 100
        121        ASSIGN                                                   !6, ~63
   17   122        ADD                                              ~65     !7, 2
        123        ASSIGN                                                   !7, ~65
        124    >   IS_SMALLER                                               !7, 15
        125      > JMPNZ                                                    ~67, ->26
   62   126    >   ECHO                                                     !6
        127      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.12 ms | 1408 KiB | 21 Q