summaryrefslogtreecommitdiffstats
path: root/reference.php
diff options
context:
space:
mode:
Diffstat (limited to 'reference.php')
-rw-r--r--reference.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/reference.php b/reference.php
new file mode 100644
index 0000000..b1cf789
--- /dev/null
+++ b/reference.php
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Hacker's Corner</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body>
+<?php
+
+ function &square(&$var)
+ {
+ $var *= $var;
+ return $var;
+ }
+
+ $num = 8;
+ $ref = &square($num); /* perform so called handshake */
+
+ echo $num . "<br />\n";
+ echo $ref . "<br /><br />\n";
+
+ $ref++;
+ echo $num . "<br />\n";
+ echo $ref . "<br />\n";
+?>
+</body>
+</html>
+