3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(0); function grabImage($url, $filename = ''){ ob_start(); readfile($url); $img_data = ob_get_contents(); ob_end_clean(); $size = strlen($img_data); $local_file = fopen($filename , 'a'); fwrite($local_file, $img_data); fclose($local_file); return $filename; } $base = "http://missmm.com/"; function a0($s){ if($s < 10){ return "00".$s; }elseif($s <100){ return "0".$s; }else{ return $s; } }; for($i=763;$i>0;$i--){ $html = file_get_contents($base.a0($i).".html"); preg_match_all('/http.*?dulei.si.*?jpg/i', $html,$arr); foreach($arr[0] as $v){ $data = pathinfo($v); grabImage($v,$data["basename"]); sleep(1); } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 6
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 36
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 36
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 6
Branch analysis from position: 40
Branch analysis from position: 6
Branch analysis from position: 36
filename:       /in/YZ4Vm
function name:  (null)
number of ops:  41
compiled vars:  !0 = $base, !1 = $i, !2 = $html, !3 = $arr, !4 = $v, !5 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'set_time_limit'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
   14     3        ASSIGN                                                   !0, 'http%3A%2F%2Fmissmm.com%2F'
   24     4        ASSIGN                                                   !1, 763
          5      > JMP                                                      ->38
   25     6    >   INIT_FCALL                                               'file_get_contents'
          7        INIT_FCALL                                               'a0'
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0  $9      
         10        CONCAT                                           ~10     !0, $9
         11        CONCAT                                           ~11     ~10, '.html'
         12        SEND_VAL                                                 ~11
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !2, $12
   26    15        INIT_FCALL                                               'preg_match_all'
         16        SEND_VAL                                                 '%2Fhttp.%2A%3Fdulei.si.%2A%3Fjpg%2Fi'
         17        SEND_VAR                                                 !2
         18        SEND_REF                                                 !3
         19        DO_ICALL                                                 
   27    20        FETCH_DIM_R                                      ~15     !3, 0
         21      > FE_RESET_R                                       $16     ~15, ->36
         22    > > FE_FETCH_R                                               $16, !4, ->36
   28    23    >   INIT_FCALL                                               'pathinfo'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                         $17     
         26        ASSIGN                                                   !5, $17
   29    27        INIT_FCALL                                               'grabimage'
         28        SEND_VAR                                                 !4
         29        FETCH_DIM_R                                      ~19     !5, 'basename'
         30        SEND_VAL                                                 ~19
         31        DO_FCALL                                      0          
   30    32        INIT_FCALL                                               'sleep'
         33        SEND_VAL                                                 1
         34        DO_ICALL                                                 
   27    35      > JMP                                                      ->22
         36    >   FE_FREE                                                  $16
   24    37        PRE_DEC                                                  !1
         38    >   IS_SMALLER                                               0, !1
         39      > JMPNZ                                                    ~23, ->6
   33    40    > > RETURN                                                   1

Function grabimage:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YZ4Vm
function name:  grabImage
number of ops:  28
compiled vars:  !0 = $url, !1 = $filename, !2 = $img_data, !3 = $size, !4 = $local_file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      ''
    4     2        INIT_FCALL                                               'ob_start'
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'readfile'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'ob_get_contents'
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
    7    10        INIT_FCALL                                               'ob_end_clean'
         11        DO_ICALL                                                 
    8    12        STRLEN                                           ~10     !2
         13        ASSIGN                                                   !3, ~10
    9    14        INIT_FCALL                                               'fopen'
         15        SEND_VAR                                                 !1
         16        SEND_VAL                                                 'a'
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !4, $12
   10    19        INIT_FCALL                                               'fwrite'
         20        SEND_VAR                                                 !4
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
   11    23        INIT_FCALL                                               'fclose'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                                 
   12    26      > RETURN                                                   !1
   13    27*     > RETURN                                                   null

End of function grabimage

Function a0:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YZ4Vm
function name:  a0
number of ops:  13
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        IS_SMALLER                                               !0, 10
          2      > JMPZ                                                     ~1, ->6
   17     3    >   CONCAT                                           ~2      '00', !0
          4      > RETURN                                                   ~2
          5*       JMP                                                      ->12
   18     6    >   IS_SMALLER                                               !0, 100
          7      > JMPZ                                                     ~3, ->11
   19     8    >   CONCAT                                           ~4      '0', !0
          9      > RETURN                                                   ~4
         10*       JMP                                                      ->12
   21    11    > > RETURN                                                   !0
   23    12*     > RETURN                                                   null

End of function a0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.86 ms | 1407 KiB | 39 Q