3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "http://apicloud.me/assets/colortag/image4.jpg"; $im = imagecreatefromjpeg($url); list($w,$h) = getimagesize($url); $colors = []; for($x=0;$x<$w;$x++) { for($y=0;$y<$h;$y++) { $i = imagecolorat($im, $x, $y); $c = imagecolorsforindex($im, $i); $colors[$x][$y] = array_values($c); } } print_r($colors);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 16
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 18
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 16
Branch analysis from position: 41
Branch analysis from position: 16
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 18
Branch analysis from position: 38
Branch analysis from position: 18
filename:       /in/GJkte
function name:  (null)
number of ops:  45
compiled vars:  !0 = $url, !1 = $im, !2 = $w, !3 = $h, !4 = $colors, !5 = $x, !6 = $y, !7 = $i, !8 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fapicloud.me%2Fassets%2Fcolortag%2Fimage4.jpg'
    4     1        INIT_FCALL_BY_NAME                                       'imagecreatefromjpeg'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $10     
          4        ASSIGN                                                   !1, $10
    5     5        INIT_FCALL                                               'getimagesize'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $12     
          8        FETCH_LIST_R                                     $13     $12, 0
          9        ASSIGN                                                   !2, $13
         10        FETCH_LIST_R                                     $15     $12, 1
         11        ASSIGN                                                   !3, $15
         12        FREE                                                     $12
    6    13        ASSIGN                                                   !4, <array>
    7    14        ASSIGN                                                   !5, 0
         15      > JMP                                                      ->39
    8    16    >   ASSIGN                                                   !6, 0
         17      > JMP                                                      ->36
    9    18    >   INIT_FCALL_BY_NAME                                       'imagecolorat'
         19        SEND_VAR_EX                                              !1
         20        SEND_VAR_EX                                              !5
         21        SEND_VAR_EX                                              !6
         22        DO_FCALL                                      0  $20     
         23        ASSIGN                                                   !7, $20
   10    24        INIT_FCALL_BY_NAME                                       'imagecolorsforindex'
         25        SEND_VAR_EX                                              !1
         26        SEND_VAR_EX                                              !7
         27        DO_FCALL                                      0  $22     
         28        ASSIGN                                                   !8, $22
   11    29        INIT_FCALL                                               'array_values'
         30        SEND_VAR                                                 !8
         31        DO_ICALL                                         $26     
         32        FETCH_DIM_W                                      $24     !4, !5
         33        ASSIGN_DIM                                               $24, !6
         34        OP_DATA                                                  $26
    8    35        PRE_INC                                                  !6
         36    >   IS_SMALLER                                               !6, !3
         37      > JMPNZ                                                    ~28, ->18
    7    38    >   PRE_INC                                                  !5
         39    >   IS_SMALLER                                               !5, !2
         40      > JMPNZ                                                    ~30, ->16
   14    41    >   INIT_FCALL                                               'print_r'
         42        SEND_VAR                                                 !4
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.8 ms | 1400 KiB | 19 Q