3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = rand(1000,9999); $_SESSION["code"] = $code; $im = imagecreatetruecolor(50, 30); imagesavealpha($im, true); $bg = imagecolorallocatealpha($im, 0, 0, 0, 127); //background color blue $fg = imagecolorallocate($im, 0, 0, 0);//text color white imagefill($im, 0, 0, $bg); imagestring($im, 8, 8, 8, $code, $fg); header("Cache-Control: no-cache, must-revalidate"); header('Content-type: image/png'); imagepng($im); imagedestroy($im); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5a6WJ
function name:  (null)
number of ops:  59
compiled vars:  !0 = $code, !1 = $im, !2 = $bg, !3 = $fg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'rand'
          1        SEND_VAL                                                 1000
          2        SEND_VAL                                                 9999
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
    3     5        FETCH_W                      global              $6      '_SESSION'
          6        ASSIGN_DIM                                               $6, 'code'
          7        OP_DATA                                                  !0
    4     8        INIT_FCALL_BY_NAME                                       'imagecreatetruecolor'
          9        SEND_VAL_EX                                              50
         10        SEND_VAL_EX                                              30
         11        DO_FCALL                                      0  $8      
         12        ASSIGN                                                   !1, $8
    5    13        INIT_FCALL_BY_NAME                                       'imagesavealpha'
         14        SEND_VAR_EX                                              !1
         15        SEND_VAL_EX                                              <true>
         16        DO_FCALL                                      0          
    6    17        INIT_FCALL_BY_NAME                                       'imagecolorallocatealpha'
         18        SEND_VAR_EX                                              !1
         19        SEND_VAL_EX                                              0
         20        SEND_VAL_EX                                              0
         21        SEND_VAL_EX                                              0
         22        SEND_VAL_EX                                              127
         23        DO_FCALL                                      0  $11     
         24        ASSIGN                                                   !2, $11
    7    25        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
         26        SEND_VAR_EX                                              !1
         27        SEND_VAL_EX                                              0
         28        SEND_VAL_EX                                              0
         29        SEND_VAL_EX                                              0
         30        DO_FCALL                                      0  $13     
         31        ASSIGN                                                   !3, $13
    8    32        INIT_FCALL_BY_NAME                                       'imagefill'
         33        SEND_VAR_EX                                              !1
         34        SEND_VAL_EX                                              0
         35        SEND_VAL_EX                                              0
         36        SEND_VAR_EX                                              !2
         37        DO_FCALL                                      0          
    9    38        INIT_FCALL_BY_NAME                                       'imagestring'
         39        SEND_VAR_EX                                              !1
         40        SEND_VAL_EX                                              8
         41        SEND_VAL_EX                                              8
         42        SEND_VAL_EX                                              8
         43        SEND_VAR_EX                                              !0
         44        SEND_VAR_EX                                              !3
         45        DO_FCALL                                      0          
   10    46        INIT_FCALL                                               'header'
         47        SEND_VAL                                                 'Cache-Control%3A+no-cache%2C+must-revalidate'
         48        DO_ICALL                                                 
   11    49        INIT_FCALL                                               'header'
         50        SEND_VAL                                                 'Content-type%3A+image%2Fpng'
         51        DO_ICALL                                                 
   12    52        INIT_FCALL_BY_NAME                                       'imagepng'
         53        SEND_VAR_EX                                              !1
         54        DO_FCALL                                      0          
   13    55        INIT_FCALL_BY_NAME                                       'imagedestroy'
         56        SEND_VAR_EX                                              !1
         57        DO_FCALL                                      0          
   14    58      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.44 ms | 1400 KiB | 17 Q