3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Report any errors header('content-type: image/png'); ini_set ("display_errors", "1"); error_reporting(E_ALL); //Set the correct content type //Create our basic image stream //125px width, 125px height $image = imagecreate(125, 125); //Set the background color $blue = imagecolorallocate($image, 0, 0, 255); //Set up another color just to show how the first color declared is used as the background color when we use imagecreate() //Notice how blue is applied to the background, *not* red. $red = imagecolorallocate($image, 255, 0, 0); //save the image as a png and output imagepng($image); //Clear up memory used imagedestroy($image);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XfD9k
function name:  (null)
number of ops:  36
compiled vars:  !0 = $image, !1 = $blue, !2 = $red
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'content-type%3A+image%2Fpng'
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'ini_set'
          4        SEND_VAL                                                 'display_errors'
          5        SEND_VAL                                                 '1'
          6        DO_ICALL                                                 
    5     7        INIT_FCALL                                               'error_reporting'
          8        SEND_VAL                                                 32767
          9        DO_ICALL                                                 
   12    10        INIT_FCALL_BY_NAME                                       'imagecreate'
         11        SEND_VAL_EX                                              125
         12        SEND_VAL_EX                                              125
         13        DO_FCALL                                      0  $6      
         14        ASSIGN                                                   !0, $6
   15    15        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
         16        SEND_VAR_EX                                              !0
         17        SEND_VAL_EX                                              0
         18        SEND_VAL_EX                                              0
         19        SEND_VAL_EX                                              255
         20        DO_FCALL                                      0  $8      
         21        ASSIGN                                                   !1, $8
   19    22        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
         23        SEND_VAR_EX                                              !0
         24        SEND_VAL_EX                                              255
         25        SEND_VAL_EX                                              0
         26        SEND_VAL_EX                                              0
         27        DO_FCALL                                      0  $10     
         28        ASSIGN                                                   !2, $10
   22    29        INIT_FCALL_BY_NAME                                       'imagepng'
         30        SEND_VAR_EX                                              !0
         31        DO_FCALL                                      0          
   25    32        INIT_FCALL_BY_NAME                                       'imagedestroy'
         33        SEND_VAR_EX                                              !0
         34        DO_FCALL                                      0          
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.38 ms | 1396 KiB | 19 Q