3v4l.org

run code in 300+ PHP versions simultaneously
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Naamloos document</title> </head> <body> <?php //Set the Content Type header('Content-type: image/jpeg'); // Create Image From Existing File $jpg_image = imagecreatefromjpeg('http://pookey.co.uk/gallery2/d/1166-4/Sunset.jpg'); // Allocate A Color For The Text $white = imagecolorallocate($jpg_image, 255, 255, 255); // Set Path to Font File $font_path = 'font.TTF'; // Set Text to Be Printed On Image $text = "This is a sunset!"; // Print Text On Image imagettftext($jpg_image, 25, 0, 75, 300, $white, $font_path, $text); // Send Image to Browser imagejpeg($jpg_image); // Clear Memory imagedestroy($jpg_image); ?> </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kPMZ8
function name:  (null)
number of ops:  35
compiled vars:  !0 = $jpg_image, !1 = $white, !2 = $font_path, !3 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21doctype+html%3E%0A%3Chtml%3E%0A%3Chead%3E%0A%3Cmeta+charset%3D%22utf-8%22%3E%0A%3Ctitle%3ENaamloos+document%3C%2Ftitle%3E%0A%3C%2Fhead%3E%0A%0A%3Cbody%3E%0A'
   11     1        INIT_FCALL                                               'header'
          2        SEND_VAL                                                 'Content-type%3A+image%2Fjpeg'
          3        DO_ICALL                                                 
   14     4        INIT_FCALL_BY_NAME                                       'imagecreatefromjpeg'
          5        SEND_VAL_EX                                              'http%3A%2F%2Fpookey.co.uk%2Fgallery2%2Fd%2F1166-4%2FSunset.jpg'
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !0, $5
   17     8        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
          9        SEND_VAR_EX                                              !0
         10        SEND_VAL_EX                                              255
         11        SEND_VAL_EX                                              255
         12        SEND_VAL_EX                                              255
         13        DO_FCALL                                      0  $7      
         14        ASSIGN                                                   !1, $7
   20    15        ASSIGN                                                   !2, 'font.TTF'
   23    16        ASSIGN                                                   !3, 'This+is+a+sunset%21'
   26    17        INIT_FCALL_BY_NAME                                       'imagettftext'
         18        SEND_VAR_EX                                              !0
         19        SEND_VAL_EX                                              25
         20        SEND_VAL_EX                                              0
         21        SEND_VAL_EX                                              75
         22        SEND_VAL_EX                                              300
         23        SEND_VAR_EX                                              !1
         24        SEND_VAR_EX                                              !2
         25        SEND_VAR_EX                                              !3
         26        DO_FCALL                                      0          
   29    27        INIT_FCALL_BY_NAME                                       'imagejpeg'
         28        SEND_VAR_EX                                              !0
         29        DO_FCALL                                      0          
   32    30        INIT_FCALL_BY_NAME                                       'imagedestroy'
         31        SEND_VAR_EX                                              !0
         32        DO_FCALL                                      0          
   33    33        ECHO                                                     '+%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   35    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.03 ms | 1396 KiB | 15 Q