3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0; $ok = true; while ( $i < 90000 ) { $i = $i + 1; $tmp="http://www.newgrounds.com/audio/listen/".$i; if (!URLIsValid($tmp)) { print $i; print"\n"; } } function URLIsValid($URL) { $exists = true; $file_headers = @get_headers($URL); $InvalidHeaders = array('404', '403', '500'); foreach($InvalidHeaders as $HeaderVal) { if(strstr($file_headers[0], $HeaderVal)) { $exists = false; break; } } return $exists; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
Branch analysis from position: 3
Branch analysis from position: 14
filename:       /in/IHpMB
function name:  (null)
number of ops:  17
compiled vars:  !0 = $i, !1 = $ok, !2 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        ASSIGN                                                   !1, <true>
    5     2      > JMP                                                      ->14
    7     3    >   ADD                                              ~5      !0, 1
          4        ASSIGN                                                   !0, ~5
    8     5        CONCAT                                           ~7      'http%3A%2F%2Fwww.newgrounds.com%2Faudio%2Flisten%2F', !0
          6        ASSIGN                                                   !2, ~7
    9     7        INIT_FCALL_BY_NAME                                       'URLIsValid'
          8        SEND_VAR_EX                                              !2
          9        DO_FCALL                                      0  $9      
         10        BOOL_NOT                                         ~10     $9
         11      > JMPZ                                                     ~10, ->14
   11    12    >   ECHO                                                     !0
   12    13        ECHO                                                     '%0A'
    5    14    >   IS_SMALLER                                               !0, 90000
         15      > JMPNZ                                                    ~11, ->3
   30    16    > > RETURN                                                   1

Function urlisvalid:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 20
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 20
Branch analysis from position: 20
filename:       /in/IHpMB
function name:  URLIsValid
number of ops:  23
compiled vars:  !0 = $URL, !1 = $exists, !2 = $file_headers, !3 = $InvalidHeaders, !4 = $HeaderVal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        ASSIGN                                                   !1, <true>
   19     2        BEGIN_SILENCE                                    ~6      
          3        INIT_FCALL                                               'get_headers'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        END_SILENCE                                              ~6
          7        ASSIGN                                                   !2, $7
   20     8        ASSIGN                                                   !3, <array>
   21     9      > FE_RESET_R                                       $10     !3, ->20
         10    > > FE_FETCH_R                                               $10, !4, ->20
   23    11    >   INIT_FCALL                                               'strstr'
         12        FETCH_DIM_R                                      ~11     !2, 0
         13        SEND_VAL                                                 ~11
         14        SEND_VAR                                                 !4
         15        DO_ICALL                                         $12     
         16      > JMPZ                                                     $12, ->19
   25    17    >   ASSIGN                                                   !1, <false>
   26    18      > JMP                                                      ->20
   21    19    > > JMP                                                      ->10
         20    >   FE_FREE                                                  $10
   29    21      > RETURN                                                   !1
   30    22*     > RETURN                                                   null

End of function urlisvalid

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.39 ms | 1400 KiB | 17 Q