3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0; $ok = true; while ( $ok ) { $i = $i + 1; $tmp="http://www.newgrounds.com/audio/listen/".$i; if (URLIsValid($tmp)) { print $i; print"\n"; print $tmp; 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 = 15
Branch analysis from position: 15
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 = 11, Position 2 = 15
Branch analysis from position: 11
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: 15
filename:       /in/P00ud
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                                                      ->15
    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      > JMPZ                                                     $9, ->15
   11    11    >   ECHO                                                     !0
   12    12        ECHO                                                     '%0A'
   13    13        ECHO                                                     !2
   14    14        ECHO                                                     '%0A'
    5    15    > > JMPNZ                                                    !1, ->3
   32    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/P00ud
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
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        ASSIGN                                                   !1, <true>
   21     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
   22     8        ASSIGN                                                   !3, <array>
   23     9      > FE_RESET_R                                       $10     !3, ->20
         10    > > FE_FETCH_R                                               $10, !4, ->20
   25    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
   27    17    >   ASSIGN                                                   !1, <false>
   28    18      > JMP                                                      ->20
   23    19    > > JMP                                                      ->10
         20    >   FE_FREE                                                  $10
   31    21      > RETURN                                                   !1
   32    22*     > RETURN                                                   null

End of function urlisvalid

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.37 ms | 1404 KiB | 17 Q