3v4l.org

run code in 300+ PHP versions simultaneously
<?php function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } mt_srand(make_seed()); $size=512; $image = imagecreatetruecolor($size,$size); $black = imagecolorallocate ($image, 0,0,0 ); $white = imagecolorallocate ($image, 255,255,255 ); for ($x = 0; $x<$size; $x++) { for ($y = 0; $y<$size; $y++) { imagesetpixel($image,$x,$y,mt_rand(0,1)?$black:$white); } } header ('Content-Type: image/png'); imagepng($image); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 27
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 46, Position 2 = 29
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 27
Branch analysis from position: 49
Branch analysis from position: 27
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 46, Position 2 = 29
Branch analysis from position: 46
Branch analysis from position: 29
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 46, Position 2 = 29
Branch analysis from position: 46
Branch analysis from position: 29
filename:       /in/vdasr
function name:  (null)
number of ops:  56
compiled vars:  !0 = $size, !1 = $image, !2 = $black, !3 = $white, !4 = $x, !5 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'mt_srand'
          1        INIT_FCALL                                               'make_seed'
          2        DO_FCALL                                      0  $6      
          3        SEND_VAR                                                 $6
          4        DO_ICALL                                                 
    7     5        ASSIGN                                                   !0, 512
    8     6        INIT_FCALL_BY_NAME                                       'imagecreatetruecolor'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !1, $9
    9    11        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
         12        SEND_VAR_EX                                              !1
         13        SEND_VAL_EX                                              0
         14        SEND_VAL_EX                                              0
         15        SEND_VAL_EX                                              0
         16        DO_FCALL                                      0  $11     
         17        ASSIGN                                                   !2, $11
   10    18        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
         19        SEND_VAR_EX                                              !1
         20        SEND_VAL_EX                                              255
         21        SEND_VAL_EX                                              255
         22        SEND_VAL_EX                                              255
         23        DO_FCALL                                      0  $13     
         24        ASSIGN                                                   !3, $13
   11    25        ASSIGN                                                   !4, 0
         26      > JMP                                                      ->47
   12    27    >   ASSIGN                                                   !5, 0
         28      > JMP                                                      ->44
   13    29    >   INIT_FCALL_BY_NAME                                       'imagesetpixel'
         30        SEND_VAR_EX                                              !1
         31        SEND_VAR_EX                                              !4
         32        SEND_VAR_EX                                              !5
         33        INIT_FCALL                                               'mt_rand'
         34        SEND_VAL                                                 0
         35        SEND_VAL                                                 1
         36        DO_ICALL                                         $17     
         37      > JMPZ                                                     $17, ->40
         38    >   QM_ASSIGN                                        ~18     !2
         39      > JMP                                                      ->41
         40    >   QM_ASSIGN                                        ~18     !3
         41    >   SEND_VAL_EX                                              ~18
         42        DO_FCALL                                      0          
   12    43        PRE_INC                                                  !5
         44    >   IS_SMALLER                                               !5, !0
         45      > JMPNZ                                                    ~21, ->29
   11    46    >   PRE_INC                                                  !4
         47    >   IS_SMALLER                                               !4, !0
         48      > JMPNZ                                                    ~23, ->27
   16    49    >   INIT_FCALL                                               'header'
         50        SEND_VAL                                                 'Content-Type%3A+image%2Fpng'
         51        DO_ICALL                                                 
   17    52        INIT_FCALL_BY_NAME                                       'imagepng'
         53        SEND_VAR_EX                                              !1
         54        DO_FCALL                                      0          
   18    55      > RETURN                                                   1

Function make_seed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vdasr
function name:  make_seed
number of ops:  17
compiled vars:  !0 = $usec, !1 = $sec
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '+'
          2        INIT_FCALL                                               'microtime'
          3        DO_ICALL                                         $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                         $3      
          6        FETCH_LIST_R                                     $4      $3, 0
          7        ASSIGN                                                   !0, $4
          8        FETCH_LIST_R                                     $6      $3, 1
          9        ASSIGN                                                   !1, $6
         10        FREE                                                     $3
    4    11        CAST                                          5  ~8      !1
         12        CAST                                          5  ~9      !0
         13        MUL                                              ~10     ~9, 100000
         14        ADD                                              ~11     ~8, ~10
         15      > RETURN                                                   ~11
    5    16*     > RETURN                                                   null

End of function make_seed

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.13 ms | 1403 KiB | 24 Q