3v4l.org

run code in 500+ PHP versions simultaneously
<?php $ndiv = 5; // small => less colors ; big => more colors $div = 255 / $ndiv; $mapping = []; for ($r = 0; $r <= 255; $r += $div) { for ($g = 0; $g <= 255; $g += $div) { for ($b = 0; $b <= 255; $b += $div) { $mapping[] = sprintf("%d,%d,%d", $r, $g, $b); } } } print_r($mapping);

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 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 6
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 8
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 6
Branch analysis from position: 29
Branch analysis from position: 6
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 10
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 8
Branch analysis from position: 26
Branch analysis from position: 8
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 10
Branch analysis from position: 23
Branch analysis from position: 10
filename:       /in/IFDvv
function name:  (null)
number of ops:  33
compiled vars:  !0 = $ndiv, !1 = $div, !2 = $mapping, !3 = $r, !4 = $g, !5 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 5
    4     1        DIV                                                  ~7      255, !0
          2        ASSIGN                                                       !1, ~7
    6     3        ASSIGN                                                       !2, <array>
    7     4        ASSIGN                                                       !3, 0
          5      > JMP                                                          ->27
    8     6    >   ASSIGN                                                       !4, 0
          7      > JMP                                                          ->24
    9     8    >   ASSIGN                                                       !5, 0
          9      > JMP                                                          ->21
   10    10    >   CAST                                              4  ~14     !3
         11        ROPE_INIT                                         5  ~18     ~14
         12        ROPE_ADD                                          1  ~18     ~18, '%2C'
         13        CAST                                              4  ~15     !4
         14        ROPE_ADD                                          2  ~18     ~18, ~15
         15        ROPE_ADD                                          3  ~18     ~18, '%2C'
         16        CAST                                              4  ~16     !5
         17        ROPE_END                                          4  ~17     ~18, ~16
         18        ASSIGN_DIM                                                   !2
         19        OP_DATA                                                      ~17
    9    20        ASSIGN_OP                                         1          !5, !1
         21    >   IS_SMALLER_OR_EQUAL                                          !5, 255
         22      > JMPNZ                                                        ~22, ->10
    8    23    >   ASSIGN_OP                                         1          !4, !1
         24    >   IS_SMALLER_OR_EQUAL                                          !4, 255
         25      > JMPNZ                                                        ~24, ->8
    7    26    >   ASSIGN_OP                                         1          !3, !1
         27    >   IS_SMALLER_OR_EQUAL                                          !3, 255
         28      > JMPNZ                                                        ~26, ->6
   15    29    >   INIT_FCALL                                                   'print_r'
         30        SEND_VAR                                                     !2
         31        DO_ICALL                                                     
         32      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
129.12 ms | 484 KiB | 8 Q