示例#1
0
 public function testGetByRef()
 {
     $scope = new Scope();
     $scope->set('testA', 3);
     $a =& $scope->getByRef('testA');
     $a = 12;
     $this->assertEquals($scope->testA, 12);
     $b =& $scope->getByRef('testB');
     $scope->testB = 40;
     $this->assertEquals($b, 40);
 }