Variable References Demo : Reference « Language Basics « PHP
- PHP
- Language Basics
- Reference
Variable References Demo
<?php
$my_foo = "A";
$my_bar = &$my_foo;
$my_foo = "B";
print($my_bar);
$my_bar = "C";
print($my_foo);
?>
Related examples in the same category