3v4l.org

run code in 300+ PHP versions simultaneously
<?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); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tfas1
function name:  (null)
number of ops:  33
compiled vars:  !0 = $jpg_image, !1 = $white, !2 = $font_path, !3 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-type%3A+image%2Fjpeg'
          2        DO_ICALL                                                 
    6     3        INIT_FCALL_BY_NAME                                       'imagecreatefromjpeg'
          4        SEND_VAL_EX                                              'http%3A%2F%2Fpookey.co.uk%2Fgallery2%2Fd%2F1166-4%2FSunset.jpg'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !0, $5
    9     7        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
          8        SEND_VAR_EX                                              !0
          9        SEND_VAL_EX                                              255
         10        SEND_VAL_EX                                              255
         11        SEND_VAL_EX                                              255
         12        DO_FCALL                                      0  $7      
         13        ASSIGN                                                   !1, $7
   12    14        ASSIGN                                                   !2, 'font.TTF'
   15    15        ASSIGN                                                   !3, 'This+is+a+sunset%21'
   18    16        INIT_FCALL_BY_NAME                                       'imagettftext'
         17        SEND_VAR_EX                                              !0
         18        SEND_VAL_EX                                              25
         19        SEND_VAL_EX                                              0
         20        SEND_VAL_EX                                              75
         21        SEND_VAL_EX                                              300
         22        SEND_VAR_EX                                              !1
         23        SEND_VAR_EX                                              !2
         24        SEND_VAR_EX                                              !3
         25        DO_FCALL                                      0          
   21    26        INIT_FCALL_BY_NAME                                       'imagejpeg'
         27        SEND_VAR_EX                                              !0
         28        DO_FCALL                                      0          
   24    29        INIT_FCALL_BY_NAME                                       'imagedestroy'
         30        SEND_VAR_EX                                              !0
         31        DO_FCALL                                      0          
   25    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.21 ms | 1388 KiB | 15 Q