There have been some changes in PHP 5.4 in how arrays work, specifically, array dereferencing. So what is array dereferencing? Well, simply it allows for things like this:
In our old code, we would have to do:
So, it just cleans up some syntax noise from some of our code. When 5.4 becomes stable, expect for PRISM to upgrade to this version as it's minimum requirement.
<?php
public function onClientConnect($UCID)
{
echo $PRISM->getClients()[$UCID]->UName;
}
?>
<?php
public function onClientConnect($UCID)
{
$Clients = $PRISM->getClients();
echo $Clients[$UCID]->UName;
}
?>