Jump to content

[SOLVED] What is the purpose of using .= and =& ??


ridiculous

Recommended Posts

Example #6 Object Assignment

 

<?php

$assigned  =  $instance;

$reference  =& $instance;

 

$instance->var = '$assigned will have this value';

 

$instance = null; // $instance and $reference become null

 

var_dump($instance);

var_dump($reference);

var_dump($assigned);

?>

 

http://www.php.net/manual/en/language.oop5.basic.php

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.