Slashdot Mirror


User: FreakTrap

FreakTrap's activity in the archive.

Stories
0
Comments
10
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 10

  1. Re:Take PHP outside web pages altogether. on March To Be Month of PHP Bugs · · Score: 2, Informative

    $a = array (1, 2, 3, 4);
    foreach ($a as &$b) $b++;
    foreach ($a as $b) $b++;
    print_r ($a);
    It is increment twice because after the first loop, $b is still a pointer to the fourth element of $a. Continuing in the code, the second loop will assign the fourth value of $a each value of $a, then increment it. Try debugging it like so:

    $a = array (1, 2, 3, 4);
    foreach($a as &$b){
    $b++;
    }
    print_r($a);
    foreach($a as $b){
    print_r($a);
    $b++;
    print_r($a);
    }
    print_r($a);
    ... and you will see what it is doing. Solution: unset your variables before you re-use them.

    $a = array (1, 2, 3, 4);
    foreach ($a as &$b) $b++;
    unset ($b)
    foreach ($a as $b) $b++;
    print_r ($a);
    And for the $$ thing, it seems to do exactly what it is intended for...

    [Simple]
    $a = "Hello World";
    $b = "a";
    echo $$b;
    //outputs 'Hello World'

    [Complex]
    $var0 = "Hell";
    $var1 = "o wo";
    $var2 = "rld!";
    $i = "var0";
    while(intval($i[3]) <= 2){
    echo $$i;
    $i[3] = intval($i[3])+1;
    }
    //outputs 'Hello World!'
  2. Re:ISP Bandwidth on P2P - From Internet Scourge to Savior · · Score: 1

    So, what are YOU going to do with your 32.4 gigabyte/Day bandwidth?

  3. Re:I Scoff at the TOS/EULA on Login Code of Conduct Found Not Binding · · Score: 1

    Ahem...

    Miranda Rights...

    I believe the suppreme court has ruled in the past that ignorant individuals must protected to a degree...

    http://en.wikipedia.org/wiki/Miranda_warning

  4. Re:Presumably they could but... on Microsoft Confirms Excel Zero-Day Attack · · Score: 1

    "Can the owner of a gun shop be charged as an accessory if a gun they sold is used in a murder?" Yep. If I go to a gun shop and say 'I need a gun, so I can kill someone,' then I am sold a gun, you bet that gun show owner is an accessory.

  5. Re:Yet another reason... on The Worst Bill You've Never Heard Of · · Score: 1

    It is. This is far from being a law. Call your senators and representatives and let them know that you will not vote for them if they support this bill...

  6. Porn on Site Says 'Go Away!'; Federal Court Says No · · Score: 1

    So, If I were still under 18, and I went to a free porn site that prompts me to verify that I am indeed 18, then I would not be legally bound to tell the truth? And if I lie, then aqire access to the site and my parents were to decide to sue the website operators for providing me with such content, how would the courts rule?

  7. Re:Longevity? on A 4.1 GHz Dual Core at $130? · · Score: 0, Flamebait

    I'm sorry, but how do you over-clock your model? Do you even know the difference between 2600+ and 2.6GHz?

  8. Re:It's all a waste of time. on Blu-Ray/HD-DVD Talks End · · Score: 1

    "That and because you can't cuddle up to a computer next to the fire."

    Actually, I can.

    http://www1.us.dell.com/content/products/productde tails.aspx/axim_x51v

  9. Analogy on Prof Denied Funds Over Evolution Evidence · · Score: 1

    Professor Foo at Bar university is denied funding, for his research on the detrimental effects of the spread of education on evolution instead of ID, by the United States Gvmt, on the grounds that he cannot proove that ID is true.

  10. Re:IP addresses for copyright infringement lawsuit on Poisoned Torrents Plague Mybittorrent · · Score: 3, Interesting

    Define 'broken'. If a file is stored in a multi-part RAR Archive with passworded encryption, is it not broken? It is an absolutly useless packet of data to anyone without the password to extract it. And when its downloaded as a broken file collection, and then extracted and watched, where is the point at which it becomes illegal? Is it illegal to download the 'broken' file, or is it illegal to extract and watch it? And if it's only illegal to extract/watch the file, then is it not illegal to upload the 'broken' file?