ScotlandPHP

Voting

Please answer this simple SPAM challenge: min(five, seven)?
(Example: nine)

The Note You're Voting On

Mike at ImmortalSoFar dot com
11 years ago
References and "return" can be flakey:

<?php
//  This only returns a copy, despite the dereferencing in the function definition
function &GetLogin ()
{
    return
$_SESSION['Login'];
}

//  This gives a syntax error
function &GetLogin ()
{
    return &
$_SESSION['Login'];
}

//  This works
function &GetLogin ()
{
   
$ret = &$_SESSION['Login'];
    return
$ret;
}
?>

<< Back to user notes page

To Top