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 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F9lLK
function name:  (null)
number of ops:  60
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        BEGIN_SILENCE                                    ~5      
          4        INIT_FCALL_BY_NAME                                       'imagecreatefromstring'
          5        INIT_FCALL                                               'file_get_contents'
          6        SEND_VAL                                                 'https%3A%2F%2Fs-media-cache-ak0.pinimg.com%2F736x%2Fed%2F35%2Fda%2Fed35da7a6dc2ed26670c73df4207eb22.jpg'
          7        DO_ICALL                                         $6      
          8        SEND_VAR_NO_REF_EX                                       $6
          9        DO_FCALL                                      0  $7      
         10        END_SILENCE                                              ~5
         11        ASSIGN                                           ~8      !0, $7
         12      > JMPNZ_EX                                         ~8      ~8, ->15
         13    > > EXIT                                                     'Cannot+Initialize+new+GD+image+stream'
         14*       BOOL                                             ~8      <true>
   12    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                                              0
         20        DO_FCALL                                      0  $9      
         21        ASSIGN                                                   !1, $9
   13    22        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
         23        SEND_VAR_EX                                              !3
         24        SEND_VAL_EX                                              255
         25        SEND_VAL_EX                                              255
         26        SEND_VAL_EX                                              255
         27        DO_FCALL                                      0  $11     
         28        ASSIGN                                                   !2, $11
   15    29        INIT_FCALL_BY_NAME                                       'imagestring'
         30        SEND_VAR_EX                                              !0
         31        SEND_VAL_EX                                              5
         32        SEND_VAL_EX                                              0
         33        SEND_VAL_EX                                              0
         34        SEND_VAL_EX                                              'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
         35        SEND_VAR_EX                                              !1
         36        DO_FCALL                                      0          
   16    37        INIT_FCALL_BY_NAME                                       'imagestring'
         38        SEND_VAR_EX                                              !0
         39        SEND_VAL_EX                                              5
         40        SEND_VAL_EX                                              0
         41        SEND_VAL_EX                                              20
         42        SEND_VAL_EX                                              'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
         43        SEND_VAR_EX                                              !1
         44        DO_FCALL                                      0          
   17    45        INIT_FCALL_BY_NAME                                       'imageline'
         46        SEND_VAR_EX                                              !0
         47        SEND_VAL_EX                                              0
         48        SEND_VAL_EX                                              200
         49        SEND_VAL_EX                                              300
         50        SEND_VAL_EX                                              202
         51        SEND_VAR_EX                                              !2
         52        DO_FCALL                                      0          
   19    53        INIT_FCALL_BY_NAME                                       'imagepng'
         54        SEND_VAR_EX                                              !0
         55        DO_FCALL                                      0          
   21    56        INIT_FCALL_BY_NAME                                       'imagedestroy'
         57        SEND_VAR_EX                                              !0
         58        DO_FCALL                                      0          
   22    59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.52 ms | 1400 KiB | 17 Q