3v4l.org

run code in 500+ 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);

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 14
Branch analysis from position: 48
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 = 48, Position 2 = 14
Branch analysis from position: 48
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:  52
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        ASSIGN                                                       !0, 246
    7     5        ASSIGN                                                       !1, 342
    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        ASSIGN                                                       !2, <array>
   11    12        ASSIGN                                                       !3, !0
         13      > JMP                                                          ->46
   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_NOT_EQUAL                                                 $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_EQUAL                                                     !3, 246
         28      > JMPZ                                                         ~14, ->30
   16    29    >   ECHO                                                         'No+output+at+all%21'
   18    30    >   IS_EQUAL                                                     !3, 250
         31      > JMPZ                                                         ~15, ->33
   19    32    >   ECHO                                                         'Still+no+output...'
   21    33    >   IS_EQUAL                                                     !3, 256
         34      > JMPZ                                                         ~16, ->36
   22    35    >   ECHO                                                         'Still+no+output...'
   24    36    >   IS_EQUAL                                                     !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        ECHO                                                         ~18
   27    42    >   CONCAT                                               ~22     'test', !3
         43        ASSIGN_DIM                                                   !2, !3
         44        OP_DATA                                                      ~22
   11    45        PRE_INC                                                      !3
         46    >   IS_SMALLER_OR_EQUAL                                          !3, !1
         47      > JMPNZ                                                        ~24, ->14
   29    48    >   INIT_FCALL                                                   'var_dump'
         49        SEND_VAR                                                     !2
         50        DO_ICALL                                                     
         51      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
183.32 ms | 2981 KiB | 18 Q