Previous | Home | Next |
$value=4;
$ref = & value;
<html> <head> <title>Returning references from Functions </title> </head> <body> <h1>Returning references from Functions </h1> <?php $value = 4; echo "Current value:", $value, "\n"; $ref = &return_reference ($value); $ref++; echo "New value:", $value, "\n"; function &return_reference (& $ref) { return $ref; } ?> </body> </html>
Output:
Previous | Home | Next |