經過大半年在javascript中游蕩
這次,再次看回php
沒用& 是引用,引的是堆中的那個
有用&也是引用,引的是棧中的那個
<?php
function dome(){
return 'wawa';
}
function ui($className){
$info = 'my name';
$b = new $className();
$x = dome();
$d = new Config();
$h = $GLOBALS;
}
class Config {
public function __construct() {
$this->path = 'src/';
$this->description = 'mycofig';
}
public function setPath(){
}
public $compile;
private $theme;
}
$domElement = 'v';
////main start
$a = new Config();
$a->compile = 'just for me';
$v = $a;
$v->compile = 'mmm';
$g = &$a;
$a = 'vvvv';
////main end
ui('Config');
$onCreate = 'list';
簡單的就是下面那樣
$w = 'wwww';
$g = $w;
$ww = &$w;
$ww = 'bbbb';