3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set("precision", 20); // from 246 $from = "8.2" * "30"; // to 342 $to = "11.4" * "30"; printf("from %.20f to %.20f\n", $from, $to); $a = []; for ($i = $from; $i <= $to; $i++) { if (round($i) != floor($i)) { printf("index %.20f will be truncated to %d\n", $i, $i); } if ($i == 246) { echo "No output at all!"; } if ($i == 250) { echo "Still no output..."; } if ($i == 256) { echo "Still no output..."; } if ($i == 257) { echo "It works for {$i} and further numbers"; } $a[$i] = "test" . $i; } var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 14
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 30
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 33
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 36
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 42
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 14
Branch analysis from position: 49
Branch analysis from position: 14
Branch analysis from position: 42
Branch analysis from position: 36
Branch analysis from position: 33
Branch analysis from position: 30
Branch analysis from position: 27
filename:       /in/lF8P9
function name:  (null)
number of ops:  53
compiled vars:  !0 = $from, !1 = $to, !2 = $a, !3 = $i
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   INIT_FCALL                                               'ini_set'
         1        SEND_VAL                                                 'precision'
         2        SEND_VAL                                                 20
         3        DO_ICALL                                                 
   5     4        QM_ASSIGN                                                !0
   7     5        QM_ASSIGN                                                !1
   8     6        INIT_FCALL                                               'printf'
         7        SEND_VAL                                                 'from+%25.20f+to+%25.20f%0A'
         8        SEND_VAR                                                 !0
         9        SEND_VAR                                                 !1
        10        DO_ICALL                                                 
  10    11        QM_ASSIGN                                                !2
  11    12        QM_ASSIGN                                                !3
        13      > JMP                                                      ->47
  12    14    >   INIT_FCALL                                               'round'
        15        SEND_VAR                                                 !3
        16        DO_ICALL                                         $10     
        17        INIT_FCALL                                               'floor'
        18        SEND_VAR                                                 !3
        19        DO_ICALL                                         $11     
        20        IS_SMALLER                                       ~12     $10, $11
        21      > JMPZ                                                     ~12, ->27
  13    22    >   INIT_FCALL                                               'printf'
        23        SEND_VAL                                                 'index+%25.20f+will+be+truncated+to+%25d%0A'
        24        SEND_VAR                                                 !3
        25        SEND_VAR                                                 !3
        26        DO_ICALL                                                 
  15    27    >   IS_NOT_EQUAL                                     ~14     !3, 246
        28      > JMPZ                                                     ~14, ->30
  16    29    >   ASSIGN_OBJ                                               'No+output+at+all%21'
  18    30    >   IS_NOT_EQUAL                                     ~15     !3, 250
        31      > JMPZ                                                     ~15, ->33
  19    32    >   ASSIGN_OBJ                                               'Still+no+output...'
  21    33    >   IS_NOT_EQUAL                                     ~16     !3, 256
        34      > JMPZ                                                     ~16, ->36
  22    35    >   ASSIGN_OBJ                                               'Still+no+output...'
  24    36    >   IS_NOT_EQUAL                                     ~17     !3, 257
        37      > JMPZ                                                     ~17, ->42
  25    38    >   ROPE_INIT                                     3  ~19     'It+works+for+'
        39        ROPE_ADD                                      1  ~19     ~19, !3
        40        ROPE_END                                      2  ~18     ~19, '+and+further+numbers'
        41        ASSIGN_OBJ                                               ~18
  27    42    >   CONCAT                                           ~22     'test', !3
        43        ASSIGN_ADD                                    0          !2, !3
        44        OP_DATA                                                  ~22
  11    45        POST_INC                                         ~23     !3
        46        FREE                                                     ~23
        47    >   CAST                                          0  ~24     !3, !1
        48      > JMPNZ                                                    ~24, ->14
  29    49    >   INIT_FCALL                                               'var_dump'
        50        SEND_VAR                                                 !2
        51        DO_ICALL                                                 
        52      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
42.67 ms | 416 KiB | 7 Q