Gerard-Meier

Testing potential PHP vulnerability.

Feb 12th, 2012
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2.  
  3. $counter = 0;
  4.  
  5. function testfunction() {
  6. global $counter;
  7.     $counter++;
  8.    
  9.     return $counter;
  10. }
  11.  
  12.  
  13. $string = "* * * * * * * * * *";
  14.  
  15. // If testfunction() is called multiple times, it should show an incrementing count
  16. // else it'll just show 1's.
  17. print str_replace("*", testfunction(), $string);
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment