<?php
ini_set('memory_limit', '256m');
$max = 2000000;
for ($i=0; $i<$max; $i++) {
$footnote = rand();
$footnotes[$i] = $footnote;
$footnoteTargets[$footnote] = $footnote;
}
for ($i=0; $i<$max; $i++) {
print "SomeText[{$footnotes[$i]}] MoreText MoreText MoreText MoreText[{$footnotes[$i+1]}]\r\n";
print "Nothing here... Nothing here.... Nothing here... Nothing here.... Nothing here... Nothing here....\r\n";
$i++;
}
print "\r\n@footnote:\r\n\r\n";
function cmpfunc($key1, $key2) {
if (rand(0, 100) > 50) {
return 1;
} else {
return -1;
}
}
uksort($footnoteTargets, 'cmpfunc');
foreach ($footnoteTargets as $target) {
print "[$target] $target $target $target\r\n";
}