mirror of
https://github.com/php/php-src.git
synced 2024-12-28 11:20:29 +08:00
28 lines
403 B
PHP
28 lines
403 B
PHP
--TEST--
|
|
ZE2 object references
|
|
--SKIPIF--
|
|
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo {
|
|
public $name;
|
|
|
|
function Foo() {
|
|
$this->name = "I'm Foo!\n";
|
|
}
|
|
}
|
|
|
|
$foo = new Foo;
|
|
echo $foo->name;
|
|
$bar = $foo;
|
|
$bar->name = "I'm Bar!\n";
|
|
|
|
// In ZE1, we would expect "I'm Foo!"
|
|
echo $foo->name;
|
|
|
|
?>
|
|
--EXPECT--
|
|
I'm Foo!
|
|
I'm Bar!
|