Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

My Random number function

Name: Anonymous 2007-10-14 15:03


<?php

function random_number(){
$thing = "echo rand();";
echo eval($thing)
}

echo random_number();

?>

Name: Anonymous 2007-10-14 15:30

noob, use recursion

Name: Anonymous 2007-10-14 15:55

function random_number() {
    return 739;
}

Name: Anonymous 2007-10-14 16:01

>>1
You should create it more abstract so it can easily be extended as needed

<?php

function random_number() {
        return create_function('$a', 'if ($a == "NEW_RANDOM_INTEGER") return rand();');
}

$randomNumberFactory = random_number();
echo $randomNumberFactory("NEW_RANDOM_INTEGER");

Name: Anonymous 2007-10-14 16:07

twat

Name: Anonymous 2007-10-14 17:17

document.write((function(){
 return (function(){Math.random.apply()}).apply
}).apply().apply());

Name: Anonymous 2007-10-14 21:43

>>6
Awesome!

Name: Anonymous 2007-10-15 3:00


def twist( seed ):
     seed ^= ( seed >> 11 )
     seed ^= ( seed << 7 ) & 0x9d2c5680
     seed ^= ( seed << 15 ) & 0xefc60000
     seed ^= ( seed >> 18 )
     return seed

Name: Anonymous 2011-01-31 20:42

<-- check em dubz

Don't change these.
Name: Email:
Entire Thread Thread List