Advertisement
Guest User

PHP #74015 test script

a guest
Feb 1st, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.94 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <?php // Simultaneous HTTP requests, prevent browser cache ?>
  4.         <?php for ($i = 0; $i < 5 * 20; ++$i): ?>
  5.             <link rel="stylesheet" href="test1.php?<?php echo md5(openssl_random_pseudo_bytes(10)); ?>" />
  6.         <?php endfor; ?>
  7.     </head>
  8.     <body>Test1</body>
  9. </html>
  10. <?php
  11.  
  12. // Test data
  13. class DUMMY implements \Serializable, \IteratorAggregate, \Countable, \ArrayAccess {
  14.     public function serialize() {}
  15.     public function unserialize($serialized) {}
  16.     public function getIterator() {}
  17.     public function offsetExists($offset) {}
  18.     public function offsetGet($offset) {}
  19.     public function offsetSet($offset, $value) {}
  20.     public function offsetUnset($offset) {}
  21.     public function count() {}
  22. }
  23.  
  24. // Provoke error
  25. $cls = new \ReflectionClass('\DUMMY');
  26. foreach ($cls->getInterfaceNames() as $interfaceName)
  27. {
  28.     class_implements($interfaceName); // Failure here
  29. }
  30. flush();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement