<?php |
$foo = 10; |
$bar = 20; |
|
function change() { |
global $foo ; |
//echo '函数内部$foo = '.$foo.'<br />'; |
//如果不把$bar定义为global变量,函数体内是不能访问$bar的 |
$bar = 0; |
$foo ++; |
} |
|
change(); |
echo $foo , ' ' , $bar ; |
?> |
typedef struct _zval_struct zval; |
... |
struct _zval_struct { |
/* Variable information */ |
zvalue_value value; /* value */ |
zend_uint refcount__gc; |
zend_uchar type; /* active type */ |
zend_uchar is_ref__gc; |
}; |