Need a quick explination on $this = $that = $theotherthing = array ();

Been seeing something recently that I'm not quite clear on.  Could someone give me a quick explanation or link to where I can find out.. What is the code snippet doing and how might it be usefully?  I guess I'm just wondering how they all relate.
<?php
$this = $that = $theotherthing = array ();
?>

Open in new window

graphxdivaAsked:
Who is Participating?
 
Hube02Connect With a Mentor Commented:
Yup, you it. It could be useful if you want several variables to start with the same value. Minimalist coding...
0
 
Hube02Commented:
That code would be the same as:

$theotherthing = array();
$that = $theotherthing;
$this = $that;

Just on a single line.
0
 
graphxdivaAuthor Commented:
Ok so just a quick version of..

$this = array();
$that = array();
$theotherthing = array();

in this case.  Thats what I figured but wasn't sure if it was building some kind of associative array.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.