3v4l.org

run code in 300+ PHP versions simultaneously
<?php $font_size = 30; $image_width = 100; $image_height = 40; $image = imagecreate($image_width, $image_height); imagecolorallocate($image, 226, 226, 226); $font_color = imagecolorallocate($image, 255, 0, 0); $line_color = imagecolorallocate($image, 0, 0, 0); for ($i=0; $i <40 ; $i++) { $x1 = rand(1, 100); $y1 = rand(1, 100); $x2 = rand(1, 100); $y2 = rand(1, 100); imageline($image, $x1, $y1, $x2, $y2, $line_color); } imagettftext($image, $font_size, 0, 10, 30, $font_color, 'font/captcha_font.ttf', $text); // imagestring($image, 4, 20, 10, $text, $font_color); imagejpeg($image);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
2 jumps found. (Code = 44) Position 1 = 61, Position 2 = 30
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 61, Position 2 = 30
Branch analysis from position: 61
Branch analysis from position: 30
filename:       /in/Y0WQg
function name:  (null)
number of ops:  75
compiled vars:  !0 = $font_size, !1 = $image_width, !2 = $image_height, !3 = $image, !4 = $font_color, !5 = $line_color, !6 = $i, !7 = $x1, !8 = $y1, !9 = $x2, !10 = $y2, !11 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 30
    3     1        ASSIGN                                                   !1, 100
    4     2        ASSIGN                                                   !2, 40
    6     3        INIT_FCALL_BY_NAME                                       'imagecreate'
          4        SEND_VAR_EX                                              !1
          5        SEND_VAR_EX                                              !2
          6        DO_FCALL                                      0  $15     
          7        ASSIGN                                                   !3, $15
    7     8        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
          9        SEND_VAR_EX                                              !3
         10        SEND_VAL_EX                                              226
         11        SEND_VAL_EX                                              226
         12        SEND_VAL_EX                                              226
         13        DO_FCALL                                      0          
    8    14        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
         15        SEND_VAR_EX                                              !3
         16        SEND_VAL_EX                                              255
         17        SEND_VAL_EX                                              0
         18        SEND_VAL_EX                                              0
         19        DO_FCALL                                      0  $18     
         20        ASSIGN                                                   !4, $18
    9    21        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
         22        SEND_VAR_EX                                              !3
         23        SEND_VAL_EX                                              0
         24        SEND_VAL_EX                                              0
         25        SEND_VAL_EX                                              0
         26        DO_FCALL                                      0  $20     
         27        ASSIGN                                                   !5, $20
   10    28        ASSIGN                                                   !6, 0
         29      > JMP                                                      ->59
   11    30    >   INIT_FCALL                                               'rand'
         31        SEND_VAL                                                 1
         32        SEND_VAL                                                 100
         33        DO_ICALL                                         $23     
         34        ASSIGN                                                   !7, $23
   12    35        INIT_FCALL                                               'rand'
         36        SEND_VAL                                                 1
         37        SEND_VAL                                                 100
         38        DO_ICALL                                         $25     
         39        ASSIGN                                                   !8, $25
   13    40        INIT_FCALL                                               'rand'
         41        SEND_VAL                                                 1
         42        SEND_VAL                                                 100
         43        DO_ICALL                                         $27     
         44        ASSIGN                                                   !9, $27
   14    45        INIT_FCALL                                               'rand'
         46        SEND_VAL                                                 1
         47        SEND_VAL                                                 100
         48        DO_ICALL                                         $29     
         49        ASSIGN                                                   !10, $29
   15    50        INIT_FCALL_BY_NAME                                       'imageline'
         51        SEND_VAR_EX                                              !3
         52        SEND_VAR_EX                                              !7
         53        SEND_VAR_EX                                              !8
         54        SEND_VAR_EX                                              !9
         55        SEND_VAR_EX                                              !10
         56        SEND_VAR_EX                                              !5
         57        DO_FCALL                                      0          
   10    58        PRE_INC                                                  !6
         59    >   IS_SMALLER                                               !6, 40
         60      > JMPNZ                                                    ~33, ->30
   17    61    >   INIT_FCALL_BY_NAME                                       'imagettftext'
         62        SEND_VAR_EX                                              !3
         63        SEND_VAR_EX                                              !0
         64        SEND_VAL_EX                                              0
         65        SEND_VAL_EX                                              10
         66        SEND_VAL_EX                                              30
         67        SEND_VAR_EX                                              !4
         68        SEND_VAL_EX                                              'font%2Fcaptcha_font.ttf'
         69        SEND_VAR_EX                                              !11
         70        DO_FCALL                                      0          
   19    71        INIT_FCALL_BY_NAME                                       'imagejpeg'
         72        SEND_VAR_EX                                              !3
         73        DO_FCALL                                      0          
         74      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.57 ms | 1400 KiB | 15 Q