Variables and References Article
A week ago PHP 4.4.0rc1 was released - this release addresses major problems with references in PHP. But not many people are fully aware of how variables and references actually work in PHP. This is where my latest article in PHP Architect comes into play. It explains in details how assigning variables, passing variables to functions and returning variables from functions work - both by-value and by-reference.
Comments
Thanx for the article, it gives a deep insight into PHP internals.
However, there's one issue left unspoken, that is PHP5 objects internal model. It's obvious they're not just variables...
How are they implemented actually?
Consider the following lines in PHP5:
$a = new Foo(); $b = $a;
Is it equivalent internally in PHP5 to this:
$a = new Foo(); $b =& $a;
If not what the difference? Is it actually "healthy" to use & with objects in PHP5? Is there speed overhead?
I'm asking all these questions because we're using PHP5 with applications which were written solely for PHP4 yet using OOP. These applications use & almost everywhere and i wonder how PHP5 treats it internally....
Life Line
Updated a waste_basket
Created 11 benches, 2 life_rings, and 3 other objects; Updated 8 benches and a waste_basket; Deleted a bench and a log; Confirmed a cafe
I walked 7.8km in 1h52m27s
Tomorrow we have elections in the UK!
Lots of local authorities, all London Councils, the Welsh Senedd, and the Scottish Parliament.
Don't forget to vote if you have the right.
I get to vote for myself again 😎.
Benches, and corrections for the QE II Gardens
Addresses on College Road
Created 2 main entrances and an entrance; Updated an entrance, a residential building, and a house building
Created an apartments building and a main entrance
I walked 9.5km in 2h21m10s
Created a waste_basket
I walked 6.6km in 1h13m23s
On my walk from Aylesbury to Princes Risborough I spotted a few new bird species. I didn't get all the best photos though!
A Common Buzzard, a Yellow Wagtail, a Greater White throat, and a Green Woodpecker.
#photography #Birds #BirdPhotogaphy #BirdsOfMastodon #nature #Buckinghamshire
Updated an alcohol shop
I walked 9.4km in 1h58m25s
Updated 2 benches
Created a bench; Updated a bench
I hiked 19.0km in 4h35m50s
I hiked 19.0km in 4h35m50s
I walked 6.8km in 1h15m36s
Updated an estate_agent office
I walked 4.1km in 55m33s
I walked 1.1km in 10m05s
My First Lapwing!
I went to the London Wetland Centre yesterday, for a day out in nature.
While hiding in a hide, this chap and a friend showed up starting to forage for grubs.
#BirdPhotography #BirdsOfMastodon #Photography #Birds #London #Nature
Created a waste_basket; Updated a cafe and a restaurant; Confirmed an estate_agent office
I walked 6.6km in 1h8m53s



Shortlink
This article has a short URL available: https://drck.me/vara-41v