Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sarim/phparraycollide
php array collide test using java
https://github.com/sarim/phparraycollide
Last synced: 10 days ago
JSON representation
php array collide test using java
- Host: GitHub
- URL: https://github.com/sarim/phparraycollide
- Owner: sarim
- Created: 2012-01-08T15:33:09.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-01-08T18:05:25.000Z (almost 13 years ago)
- Last Synced: 2023-03-14T12:01:26.304Z (over 1 year ago)
- Language: Java
- Size: 938 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
PHP internally uses hashtables to store arrays. If we create a hashtable with 100% collisions (i.e. all keys will have the same hash). Then php need to recreate the hash for every element of the array.
Read more on the orginal article of nikic.
http://nikic.github.com/2011/12/28/Supercolliding-a-PHP-array.htmlI created a simple app to generate colliding array and upload (HTTP POST) it to a php site.
# Generating Colliding array data.
The provided data.txt is 2 ^ 17. if you use it then skip to **Running**
Compile
javac generatedata.java
Generate the data as follows,java generatedata 17 > data.txt
Here 17 means it will generate 2 ^ 17 terms.
# Running
compile colid.java
javac colid.java
run it
java colid data.txt http://localhost/example.php 5Here data.txt is the generated data, then the link. And 5 is the concurrent number of threads.
NB: Use it at your own risk only to load test your **own** server, Any unauthorized or evil use is not the authors intention and hence, unethical.