Beware the dog

If you are running on PHP 4, this program will tell you that you have a dog called Rex and a dog called Rover ... but on PHP 5, you will be told that both dogs are called Rex. This is because the PHP 5 object model copies the reference, but the PHP 4 object model duplicates (clones) the whole object

Our first dog is called Rex and is 4380 days old
Our second dog is called Rex and is 4380 days old


Training sample © 2024, WELL HOUSE CONSULTANTS LTD
This is http://www.wellho.net/demo/bewarethedog.php
See source code here • More examples - same topic here
Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
Phone: +44 (0) 1225 708 225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net