Re: Strange notation to create object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try this

<?php

$a = 1;
$b = $a; 
$c =& $a;

$a = 2;
printf("a=%d, b=%d, c=%d\n", $a, $b, $c);

$c = 3;
printf("a=%d, b=%d, c=%d\n", $a, $b, $c);

?>

On 6/23/05, Michael Stepanov <michaelstepanov@xxxxxxxxxxxxx> wrote:
> Dear all,
> 
> Usually, I develop on Perl. But my current task pushes me to start use
> PHP. Generally, it's great but sometimes I'm a little bit confused.
> For example, recently I've found a strange notation of creation of PHP
> objects:
> 
> $obj = & new SomeObject();
> 
> Can anyone explain me meaning of *&*?
> 
> Thanks in advanced
> 
> --
> Best regards,
> Michael Stepanov
> Perl/Linux Developer
> Francoudi & Stephanou Ltd
> Tel: +357 25-867154
> Email: michaelstepanov@xxxxxxxxxxxxx
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux