3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * PHP GD * create a simple image with GD library * */ //setting the image header in order to proper display the image header("Content-Type: image/png"); //try to create an image $im = imagecreatefromstring(file_get_contents("https://s-media-cache-ak0.pinimg.com/736x/ed/35/da/ed35da7a6dc2ed26670c73df4207eb22.jpg")) or die("Cannot Initialize new GD image stream"); //set the color for the text $text_color = imagecolorallocate($im, 0, 0, 0); $white = imagecolorallocate($img, 255, 255, 255); //adf the string to the image imagestring($im, 5, 0, 0, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", $text_color); imagestring($im, 5, 0, 20,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", $text_color); imageline($im,0,200,300,202,$white); //outputs the image as png imagepng($im); //frees any memory associated with the image imagedestroy($im); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mCZPp
function name:  (null)
number of ops:  58
compiled vars:  !0 = $im, !1 = $text_color, !2 = $white, !3 = $img
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-Type%3A+image%2Fpng'
          2        DO_ICALL                                                 
   10     3        INIT_FCALL_BY_NAME                                       'imagecreatefromstring'
          4        INIT_FCALL                                               'file_get_contents'
          5        SEND_VAL                                                 'https%3A%2F%2Fs-media-cache-ak0.pinimg.com%2F736x%2Fed%2F35%2Fda%2Fed35da7a6dc2ed26670c73df4207eb22.jpg'
          6        DO_ICALL                                         $5      
          7        SEND_VAR_NO_REF_EX                                       $5
          8        DO_FCALL                                      0  $6      
          9        ASSIGN                                           ~7      !0, $6
         10      > JMPNZ_EX                                         ~7      ~7, ->13
   11    11    > > EXIT                                                     'Cannot+Initialize+new+GD+image+stream'
         12*       BOOL                                             ~7      <true>
   13    13    >   INIT_FCALL_BY_NAME                                       'imagecolorallocate'
         14        SEND_VAR_EX                                              !0
         15        SEND_VAL_EX                                              0
         16        SEND_VAL_EX                                              0
         17        SEND_VAL_EX                                              0
         18        DO_FCALL                                      0  $8      
         19        ASSIGN                                                   !1, $8
   14    20        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
         21        SEND_VAR_EX                                              !3
         22        SEND_VAL_EX                                              255
         23        SEND_VAL_EX                                              255
         24        SEND_VAL_EX                                              255
         25        DO_FCALL                                      0  $10     
         26        ASSIGN                                                   !2, $10
   16    27        INIT_FCALL_BY_NAME                                       'imagestring'
         28        SEND_VAR_EX                                              !0
         29        SEND_VAL_EX                                              5
         30        SEND_VAL_EX                                              0
         31        SEND_VAL_EX                                              0
         32        SEND_VAL_EX                                              'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
         33        SEND_VAR_EX                                              !1
         34        DO_FCALL                                      0          
   17    35        INIT_FCALL_BY_NAME                                       'imagestring'
         36        SEND_VAR_EX                                              !0
         37        SEND_VAL_EX                                              5
         38        SEND_VAL_EX                                              0
         39        SEND_VAL_EX                                              20
         40        SEND_VAL_EX                                              'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
         41        SEND_VAR_EX                                              !1
         42        DO_FCALL                                      0          
   18    43        INIT_FCALL_BY_NAME                                       'imageline'
         44        SEND_VAR_EX                                              !0
         45        SEND_VAL_EX                                              0
         46        SEND_VAL_EX                                              200
         47        SEND_VAL_EX                                              300
         48        SEND_VAL_EX                                              202
         49        SEND_VAR_EX                                              !2
         50        DO_FCALL                                      0          
   20    51        INIT_FCALL_BY_NAME                                       'imagepng'
         52        SEND_VAR_EX                                              !0
         53        DO_FCALL                                      0          
   22    54        INIT_FCALL_BY_NAME                                       'imagedestroy'
         55        SEND_VAR_EX                                              !0
         56        DO_FCALL                                      0          
   23    57      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.19 ms | 1400 KiB | 17 Q