찾다
백엔드 개발PHP 튜토리얼【PHP内核学习】变量跟数据类型

【PHP内核学习】变量和数据类型

<div class="line" id="LC1" style="padding-left:10px; height:18px">|=-----------------------------------------------------------------------=|<div class="line" id="LC2" style="padding-left:10px; height:18px">|=---------------------=[ PHP内核中的变量和数据类型]=--------------------=|<div class="line" id="LC3" style="padding-left:10px; height:18px">|=-----------------------------------------------------------------------=|<div class="line" id="LC4" style="padding-left:10px; height:18px">|=--------------------------=[ by d4shman ]=-----------------------------=|<div class="line" id="LC5" style="padding-left:10px; height:18px">|=-----------------------------------------------------------------------=|<div class="line" id="LC6" style="padding-left:10px; height:18px">|=-------------------------=[  May 6, 2014  ]=---------------------------=|<div class="line" id="LC7" style="padding-left:10px; height:18px">|=-----------------------------------------------------------------------=|<div class="line" id="LC8" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC9" style="padding-left:10px; height:18px">(_____ \| |   | (_____ \   /\   / _____) |  / )   <div class="line" id="LC10" style="padding-left:10px; height:18px"> _____) ) |__ | |_____) ) /  \ | /     | | / /    <div class="line" id="LC11" style="padding-left:10px; height:18px">|  ____/|  __)| (_____ ( / /\ \| |     | |<div class="line" id="LC12" style="padding-left:10px; height:18px">| |     | |   | |     | | |__| | \_____| | \ \    <div class="line" id="LC13" style="padding-left:10px; height:18px">|_|     |_|   |_|     |_|______|\______)_|  \_)   (向phrack致敬!)<div class="line" id="LC14" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC15" style="padding-left:10px; height:18px"><div class="line" id="LC16" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC17" style="padding-left:10px; height:18px"> 0x01  变量的结构和类型<div class="line" id="LC18" style="padding-left:10px; height:18px"> 0x02  哈希表--PHP的灵魂<div class="line" id="LC19" style="padding-left:10px; height:18px"> 0x03  常量<div class="line" id="LC20" style="padding-left:10px; height:18px"> 0x04  参考文献<div class="line" id="LC21" style="padding-left:10px; height:18px"><div class="line" id="LC22" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC23" style="padding-left:10px; height:18px">/////<div class="line" id="LC24" style="padding-left:10px; height:18px">0x01  变量的结构和类型<div class="line" id="LC25" style="padding-left:10px; height:18px">/////<div class="line" id="LC26" style="padding-left:10px; height:18px">1.数据类型<div class="line" id="LC27" style="padding-left:10px; height:18px">  1.1静态类型语言(C/Java),编译时确定<div class="line" id="LC28" style="padding-left:10px; height:18px">  1.2动态类型语言(php/python),运行时确定<div class="line" id="LC29" style="padding-left:10px; height:18px">  1.3无类型语言(汇编),操作的底层存储<div class="line" id="LC30" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC31" style="padding-left:10px; height:18px">2.php内核中所有的变量使用同一种数据结构zval来保存,而这个结构同时表示php中各种数据类型,它不仅仅包含变量的值,也包含变量的类型。这就是php弱类型的核心。<div class="line" id="LC32" style="padding-left:10px; height:18px">        php中的8中数据类型:<div class="line" id="LC33" style="padding-left:10px; height:18px">  2.1标量类型: boolean, integer, float, string<div class="line" id="LC34" style="padding-left:10px; height:18px">  2.2复合类型:  array, object<div class="line" id="LC35" style="padding-left:10px; height:18px">  2.3特殊类型: resource, null<div class="line" id="LC36" style="padding-left:10px; height:18px">  <div class="line" id="LC37" style="padding-left:10px; height:18px">3.zval结构体(在php源码目录下Zend/zend.h中定义):<div class="line" id="LC38" style="padding-left:10px; height:18px">  struct _zval_struct{<div class="line" id="LC39" style="padding-left:10px; height:18px">  	  /*Variable information*/<div class="line" id="LC40" style="padding-left:10px; height:18px">  	  zvalue_value value  	/*value, 变量的值*/<div class="line" id="LC41" style="padding-left:10px; height:18px">  	  zend_uint refcount__gc  /*reference count, 引用计数器*/<div class="line" id="LC42" style="padding-left:10px; height:18px">  	  zend_uchar type 		/*active type, 变量的类型*/<div class="line" id="LC43" style="padding-left:10px; height:18px">  	  zend_uchar is_ref__gc;  /*变量是否被引用*/<div class="line" id="LC44" style="padding-left:10px; height:18px">  }<div class="line" id="LC45" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC46" style="padding-left:10px; height:18px">4.变量类型:<div class="line" id="LC47" style="padding-left:10px; height:18px">  /*data types */<div class="line" id="LC48" style="padding-left:10px; height:18px">  #define IS_NULL		0 <div class="line" id="LC49" style="padding-left:10px; height:18px">  #define IS_LONG 		1<div class="line" id="LC50" style="padding-left:10px; height:18px">  #define IS_DOUBLE 	2<div class="line" id="LC51" style="padding-left:10px; height:18px">  #define IS_BOOL 		3<div class="line" id="LC52" style="padding-left:10px; height:18px">  #define IS_ARRAY		4<div class="line" id="LC53" style="padding-left:10px; height:18px">  #define IS_OBJECT		5<div class="line" id="LC54" style="padding-left:10px; height:18px">  #define IS_STRING 	6<div class="line" id="LC55" style="padding-left:10px; height:18px">  #define IS_RESOURCE	7<div class="line" id="LC56" style="padding-left:10px; height:18px">  #define IS_CONSTANT	8<div class="line" id="LC57" style="padding-left:10px; height:18px">  #define IS_CONSTANT_ARRAY	9<div class="line" id="LC58" style="padding-left:10px; height:18px">  #define IS_CALLABLE	10<div class="line" id="LC59" style="padding-left:10px; height:18px">  <div class="line" id="LC60" style="padding-left:10px; height:18px">5.变量的值存储<div class="line" id="LC61" style="padding-left:10px; height:18px">  typedef union _zvalue_value {<div class="line" id="LC62" style="padding-left:10px; height:18px">      long lval; 		/*long、bool、resource类型*/<div class="line" id="LC63" style="padding-left:10px; height:18px">	  double dval ;	/*double 类型*/<div class="line" id="LC64" style="padding-left:10px; height:18px">	  struct {		/*string 类型, len保存了字符串的长度*/<div class="line" id="LC65" style="padding-left:10px; height:18px">	  	char *val;<div class="line" id="LC66" style="padding-left:10px; height:18px">	  	int len;<div class="line" id="LC67" style="padding-left:10px; height:18px">	  } str;<div class="line" id="LC68" style="padding-left:10px; height:18px">	  HashTable *ht;  /*数组, 用HashTable实现*/<div class="line" id="LC69" style="padding-left:10px; height:18px">	  zend_object_value obj; /*object 类型*/<div class="line" id="LC70" style="padding-left:10px; height:18px">  } zvalue_value;<div class="line" id="LC71" style="padding-left:10px; height:18px">  <div class="line" id="LC72" style="padding-left:10px; height:18px">  这里之所以用共同体(union)是因为一个变量只可能有一种类型,符合共同体的特性,如果使用结构体则会浪费内存。<div class="line" id="LC73" style="padding-left:10px; height:18px">  <div class="line" id="LC74" style="padding-left:10px; height:18px">  实例:创建一个值为10的整型变量lvar,用php脚本的话很简单,就是:$lvar = 10<div class="line" id="LC75" style="padding-left:10px; height:18px">  而PHP内核中的实现可能就是类似下面这样:<div class="line" id="LC76" style="padding-left:10px; height:18px">  zval lval;<div class="line" id="LC77" style="padding-left:10px; height:18px">  Z_TYPE(lvar) = IS_LONG;<div class="line" id="LC78" style="padding-left:10px; height:18px">  Z_LVAL(lvar) = 10;<div class="line" id="LC79" style="padding-left:10px; height:18px">  <div class="line" id="LC80" style="padding-left:10px; height:18px">/////<div class="line" id="LC81" style="padding-left:10px; height:18px">0x02  哈希表--PHP的灵魂<div class="line" id="LC82" style="padding-left:10px; height:18px">/////<div class="line" id="LC83" style="padding-left:10px; height:18px">1.为什么用哈希表<div class="line" id="LC84" style="padding-left:10px; height:18px">  哈希表通常提供CRUD(Create, Read, Update, Delete)操作,设计合理的哈希表中,这些操作时间复杂度为O(1),这也是它被钟爱的原因。<div class="line" id="LC85" style="padding-left:10px; height:18px">  hash(key) -> index<div class="line" id="LC86" style="padding-left:10px; height:18px">  <div class="line" id="LC87" style="padding-left:10px; height:18px">2.哈希表的实现:结构体 bucket和_hashtable组成了完整的HashTable。<div class="line" id="LC88" style="padding-left:10px; height:18px">  首先看bucket结构体(定义在 Zend/zend_hash.h):<div class="line" id="LC89" style="padding-left:10px; height:18px">  typedef struct bucket {<div class="line" id="LC90" style="padding-left:10px; height:18px">	  ulong h;  					/*hash值*/<div class="line" id="LC91" style="padding-left:10px; height:18px">	  uint nKeyLength;			/*key的长度*/<div class="line" id="LC92" style="padding-left:10px; height:18px">	  void *pData;				/*要保存的内存块地址,通常是malloc来的地址*/<div class="line" id="LC93" style="padding-left:10px; height:18px">	  void *pDataPtr;				/*保存指针数据,不经过malloc的指针,防止产生内存碎片*/<div class="line" id="LC94" style="padding-left:10px; height:18px">	  struct bucket *pListNext;   /*bucket中具有同一hash值的下一个元素*/<div class="line" id="LC95" style="padding-left:10px; height:18px">	  struct bucket *pListLast;   /*bucket中具有同一hash值的上一个元素*/<div class="line" id="LC96" style="padding-left:10px; height:18px">	  struct bucket *pNext;		/*双向链表的下一个元素*/<div class="line" id="LC97" style="padding-left:10px; height:18px">	  struct bucket *pLast;       /*双向链表的上一个元素*/<div class="line" id="LC98" style="padding-left:10px; height:18px">	  const char *arKey;			/*保存key*/<div class="line" id="LC99" style="padding-left:10px; height:18px">  } Bucket;<div class="line" id="LC100" style="padding-left:10px; height:18px">  <div class="line" id="LC101" style="padding-left:10px; height:18px">  可以看出bucket是一个双向链表,这是为了解决多个key冲突的问题(即算法导论中的链接法)<div class="line" id="LC102" style="padding-left:10px; height:18px">  <div class="line" id="LC103" style="padding-left:10px; height:18px">  <div class="line" id="LC104" style="padding-left:10px; height:18px">  再看_hashtable结构体:<div class="line" id="LC105" style="padding-left:10px; height:18px">  typedef struct _hashtable {<div class="line" id="LC106" style="padding-left:10px; height:18px">      uint nTableSize;                /*bucket数组的大小*/<div class="line" id="LC107" style="padding-left:10px; height:18px">	  uint nTableMask;				<div class="line" id="LC108" style="padding-left:10px; height:18px">	  uint nNumOfElements;			/*HashTable中元素的个数*/<div class="line" id="LC109" style="padding-left:10px; height:18px">	  ulong nNextFreeElement;			/*下一个可用的Bucket位置*/<div class="line" id="LC110" style="padding-left:10px; height:18px">	  Bucket *pInternalPointer		/*遍历HashTable元素*/<div class="line" id="LC111" style="padding-left:10px; height:18px">	  Bucket *pListHead;				/*双向链表表头*/<div class="line" id="LC112" style="padding-left:10px; height:18px">	  Bucket *pListTail;				/*双向链表表尾*/<div class="line" id="LC113" style="padding-left:10px; height:18px">	  Bucket **arBuckets;				/*Bucket数组*/<div class="line" id="LC114" style="padding-left:10px; height:18px">  } HashTable;<div class="line" id="LC115" style="padding-left:10px; height:18px">  <div class="line" id="LC116" style="padding-left:10px; height:18px">  ========<div class="line" id="LC117" style="padding-left:10px; height:18px">  此处为HashTable的结构图<div class="line" id="LC118" style="padding-left:10px; height:18px">  ========<div class="line" id="LC119" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC120" style="padding-left:10px; height:18px">3.神奇的数字--33<div class="line" id="LC121" style="padding-left:10px; height:18px">  见我原来的一篇博客:http://blog.csdn.net/wusuopubupt/article/details/11479869<div class="line" id="LC122" style="padding-left:10px; height:18px">  下面是PHP源码中的一段注释:<div class="line" id="LC123" style="padding-left:10px; height:18px">  /*<div class="line" id="LC124" style="padding-left:10px; height:18px">   * DJBX33A (Daniel J. Bernstein, Times 33 with Addition)<div class="line" id="LC125" style="padding-left:10px; height:18px">   *<div class="line" id="LC126" style="padding-left:10px; height:18px">   * This is Daniel J. Bernstein's popular `times 33' hash function as<div class="line" id="LC127" style="padding-left:10px; height:18px">   * posted by him years ago on comp.lang.c. It basically uses a function<div class="line" id="LC128" style="padding-left:10px; height:18px">   * like ``hash(i) = hash(i-1) * 33 + str[i]''. This is one of the best<div class="line" id="LC129" style="padding-left:10px; height:18px">   * known hash functions for strings. Because it is both computed very<div class="line" id="LC130" style="padding-left:10px; height:18px">   * fast and distributes very well.<div class="line" id="LC131" style="padding-left:10px; height:18px">   *<div class="line" id="LC132" style="padding-left:10px; height:18px">   * The magic of number 33, i.e. why it works better than many other<div class="line" id="LC133" style="padding-left:10px; height:18px">   * constants, prime or not, has never been adequately explained by<div class="line" id="LC134" style="padding-left:10px; height:18px">   * anyone. So I try an explanation: if one experimentally tests all<div class="line" id="LC135" style="padding-left:10px; height:18px">   * multipliers between 1 and 256 (as RSE did now) one detects that even<div class="line" id="LC136" style="padding-left:10px; height:18px">   * numbers are not useable at all. The remaining 128 odd numbers<div class="line" id="LC137" style="padding-left:10px; height:18px">   * (except for the number 1) work more or less all equally well. They<div class="line" id="LC138" style="padding-left:10px; height:18px">   * all distribute in an acceptable way and this way fill a hash table<div class="line" id="LC139" style="padding-left:10px; height:18px">   * with an average percent of approx. 86%.<div class="line" id="LC140" style="padding-left:10px; height:18px">   *<div class="line" id="LC141" style="padding-left:10px; height:18px">   * If one compares the Chi^2 values of the variants, the number 33 not<div class="line" id="LC142" style="padding-left:10px; height:18px">   * even has the best value. But the number 33 and a few other equally<div class="line" id="LC143" style="padding-left:10px; height:18px">   * good numbers like 17, 31, 63, 127 and 129 have nevertheless a great<div class="line" id="LC144" style="padding-left:10px; height:18px">   * advantage to the remaining numbers in the large set of possible<div class="line" id="LC145" style="padding-left:10px; height:18px">   * multipliers: their multiply operation can be replaced by a faster<div class="line" id="LC146" style="padding-left:10px; height:18px">   * operation based on just one shift plus either a single addition<div class="line" id="LC147" style="padding-left:10px; height:18px">   * or subtraction operation. And because a hash function has to both<div class="line" id="LC148" style="padding-left:10px; height:18px">   * distribute good _and_ has to be very fast to compute, those few<div class="line" id="LC149" style="padding-left:10px; height:18px">   * numbers should be preferred and seems to be the reason why Daniel J.<div class="line" id="LC150" style="padding-left:10px; height:18px">   * Bernstein also preferred it.<div class="line" id="LC151" style="padding-left:10px; height:18px">   *<div class="line" id="LC152" style="padding-left:10px; height:18px">   *<div class="line" id="LC153" style="padding-left:10px; height:18px">   *                  -- Ralf S. Engelschall <div class="line" id="LC154" style="padding-left:10px; height:18px">   */<div class="line" id="LC155" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC156" style="padding-left:10px; height:18px">  <div class="line" id="LC157" style="padding-left:10px; height:18px">4.哈希表的操作接口(省略了部分参数)<div class="line" id="LC158" style="padding-left:10px; height:18px">  初始化HashTable:int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction);<div class="line" id="LC159" style="padding-left:10px; height:18px">  添加新hash值:   int _zend_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData)<div class="line" id="LC160" style="padding-left:10px; height:18px">  查找hash:       int zend_hash_find(const HashTable *ht, const char *arKey, uint nKeyLength, void **pData);<div class="line" id="LC161" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC162" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC163" style="padding-left:10px; height:18px">/////<div class="line" id="LC164" style="padding-left:10px; height:18px">0x03  常量<div class="line" id="LC165" style="padding-left:10px; height:18px">///// <div class="line" id="LC166" style="padding-left:10px; height:18px">1.常量的内部结构<div class="line" id="LC167" style="padding-left:10px; height:18px">  typedef struct _zend_constant {<div class="line" id="LC168" style="padding-left:10px; height:18px">	  zval value;<div class="line" id="LC169" style="padding-left:10px; height:18px">	  int flags;  /*常量标记,如 CONST_PERSISTENT | CONST_CS */<div class="line" id="LC170" style="padding-left:10px; height:18px">	  char *name;<div class="line" id="LC171" style="padding-left:10px; height:18px">	  uint name_len;<div class="line" id="LC172" style="padding-left:10px; height:18px">	  int module_number;<div class="line" id="LC173" style="padding-left:10px; height:18px">  } zend_constant;<div class="line" id="LC174" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC175" style="padding-left:10px; height:18px">2.define定义常量的过程  <div class="line" id="LC176" style="padding-left:10px; height:18px">  define的实现(定义在Zend/zend_builtin_functions.c),下面是部分核心代码:<div class="line" id="LC177" style="padding-left:10px; height:18px">  <div class="line" id="LC178" style="padding-left:10px; height:18px">  ZEND_FUNCTION(define)<div class="line" id="LC179" style="padding-left:10px; height:18px">  {<div class="line" id="LC180" style="padding-left:10px; height:18px">      /* 检查常量名是否存在 */<div class="line" id="LC181" style="padding-left:10px; height:18px">      if (zend_memnstr(name, "::", sizeof("::") - 1, name + name_len)) {<div class="line" id="LC182" style="padding-left:10px; height:18px">          zend_error(E_WARNING, "Class constants cannot be defined or redefined");<div class="line" id="LC183" style="padding-left:10px; height:18px">          RETURN_FALSE;<div class="line" id="LC184" style="padding-left:10px; height:18px">      }<div class="line" id="LC185" style="padding-left:10px; height:18px">      <div class="line" id="LC186" style="padding-left:10px; height:18px">      ... // 类常量定义 此处不做介绍<div class="line" id="LC187" style="padding-left:10px; height:18px">      <div class="line" id="LC188" style="padding-left:10px; height:18px">      c.value = *val;<div class="line" id="LC189" style="padding-left:10px; height:18px">      zval_copy_ctor(&c.value);<div class="line" id="LC190" style="padding-left:10px; height:18px">      if (val_free) {<div class="line" id="LC191" style="padding-left:10px; height:18px">              zval_ptr_dtor(&val_free);<div class="line" id="LC192" style="padding-left:10px; height:18px">      }<div class="line" id="LC193" style="padding-left:10px; height:18px">      c.flags = case_sensitive;  /* 大小写敏感 */<div class="line" id="LC194" style="padding-left:10px; height:18px">      c.name = zend_strndup(name, name_len);<div class="line" id="LC195" style="padding-left:10px; height:18px">      c.name_len = name_len+1;<div class="line" id="LC196" style="padding-left:10px; height:18px">      c.module_number = PHP_USER_CONSTANT;<div class="line" id="LC197" style="padding-left:10px; height:18px">      if (zend_register_constant(&c TSRMLS_CC) == SUCCESS) {  /*注册常量*/<div class="line" id="LC198" style="padding-left:10px; height:18px">              RETURN_TRUE;<div class="line" id="LC199" style="padding-left:10px; height:18px">      } else {<div class="line" id="LC200" style="padding-left:10px; height:18px">              RETURN_FALSE;<div class="line" id="LC201" style="padding-left:10px; height:18px">      }<div class="line" id="LC202" style="padding-left:10px; height:18px">  }<div class="line" id="LC203" style="padding-left:10px; height:18px">  <div class="line" id="LC204" style="padding-left:10px; height:18px">3.魔术常量<div class="line" id="LC205" style="padding-left:10px; height:18px">  PHP中的魔术常量,虽然叫做常量,但它们的值实际上随它们在代码中的位置而变化的。<div class="line" id="LC206" style="padding-left:10px; height:18px">  __LINE__	 	文件中的当前行号。<div class="line" id="LC207" style="padding-left:10px; height:18px">  __FILE__	 	文件的完整路径和文件名。如果用在被包含文件中,则返回被包含的文件名。<div class="line" id="LC208" style="padding-left:10px; height:18px">  __DIR__	 	文件所在的目录。如果用在被包括文件中,则返回被包括的文件所在的目录。它等价于 dirname(__FILE__)。<div class="line" id="LC209" style="padding-left:10px; height:18px">  __FUNCTION__	函数名称<div class="line" id="LC210" style="padding-left:10px; height:18px">  __CLASS__	 	类的名称。类名包括其被声明的作用区域(例如 Foo\Bar)。<div class="line" id="LC211" style="padding-left:10px; height:18px">  __TRAIT__	 	Trait 的名字。Trait 名包括其被声明的作用区域(例如 Foo\Bar)。<div class="line" id="LC212" style="padding-left:10px; height:18px">  __METHOD__	类的方法名<div class="line" id="LC213" style="padding-left:10px; height:18px">  __NAMESPACE__	当前命名空间的名称(区分大小写)。此常量是在编译时定义的(PHP 5.3.0 新增)。<div class="line" id="LC214" style="padding-left:10px; height:18px">  <div class="line" id="LC215" style="padding-left:10px; height:18px">  PHP内核会在词法解析时将这些常量的内容赋值进行替换,而不是在运行时进行分析。 举个例子:<div class="line" id="LC216" style="padding-left:10px; height:18px">  <?php </p><div class="line" id="LC217" style="padding-left:10px; height:18px">  echo __LINE__;<div class="line" id="LC218" style="padding-left:10px; height:18px">  function demo() {<div class="line" id="LC219" style="padding-left:10px; height:18px">    echo __FUNCTION__;<div class="line" id="LC220" style="padding-left:10px; height:18px">  }<div class="line" id="LC221" style="padding-left:10px; height:18px">  demo();<div class="line" id="LC222" style="padding-left:10px; height:18px">  ?><div class="line" id="LC223" style="padding-left:10px; height:18px">  PHP已经在词法解析时将这些常量换成了对应的值,以上的代码可以看成如下的PHP代码:<div class="line" id="LC224" style="padding-left:10px; height:18px">  <?php </p><div class="line" id="LC225" style="padding-left:10px; height:18px">  echo 2;<div class="line" id="LC226" style="padding-left:10px; height:18px">  function demo() {<div class="line" id="LC227" style="padding-left:10px; height:18px">      echo "demo";<div class="line" id="LC228" style="padding-left:10px; height:18px">  }<div class="line" id="LC229" style="padding-left:10px; height:18px">  demo();<div class="line" id="LC230" style="padding-left:10px; height:18px">  ?><div class="line" id="LC231" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC232" style="padding-left:10px; height:18px">  ===========<div class="line" id="LC233" style="padding-left:10px; height:18px">  此处涉及编译原理知识,需补充。<div class="line" id="LC234" style="padding-left:10px; height:18px">  ===========<div class="line" id="LC235" style="padding-left:10px; height:18px">  <div class="line" id="LC236" style="padding-left:10px; height:18px">/////<div class="line" id="LC237" style="padding-left:10px; height:18px">0x04  参考文献<div class="line" id="LC238" style="padding-left:10px; height:18px">///// <div class="line" id="LC239" style="padding-left:10px; height:18px">
<br ><div class="line" id="LC240" style="padding-left:10px; height:18px">TIPI: http://www.php-internals.com/book/?p=chapt03/03-00-variable-and-data-types<dl class="comment_item comment_topic">
<dt class="comment_head">1楼<span class="user">wusuopuBUPT<span class="ptime">昨天 14:06</span></span>
</dt>
<dd class="comment_body">本文github地址:https://github.com/wusuopubupt/phpLib/blob/master/PHP%E5%86%85%E6%A0%B8%E4%B8%AD%E7%9A%84%E5%8F%98%E9%87%8F%E5%92%8C%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B</dd>
</dl>
<div class="clear">
                 
              
              
        
            </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div>
</div>
</div>
</div>
</div>
</div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
解决方法:您的组织要求您更改 PIN 码解决方法:您的组织要求您更改 PIN 码Oct 04, 2023 pm 05:45 PM

“你的组织要求你更改PIN消息”将显示在登录屏幕上。当在使用基于组织的帐户设置的电脑上达到PIN过期限制时,就会发生这种情况,在该电脑上,他们可以控制个人设备。但是,如果您使用个人帐户设置了Windows,则理想情况下不应显示错误消息。虽然情况并非总是如此。大多数遇到错误的用户使用个人帐户报告。为什么我的组织要求我在Windows11上更改我的PIN?可能是您的帐户与组织相关联,您的主要方法应该是验证这一点。联系域管理员会有所帮助!此外,配置错误的本地策略设置或不正确的注册表项也可能导致错误。即

Windows 11 上调整窗口边框设置的方法:更改颜色和大小Windows 11 上调整窗口边框设置的方法:更改颜色和大小Sep 22, 2023 am 11:37 AM

Windows11将清新优雅的设计带到了最前沿;现代界面允许您个性化和更改最精细的细节,例如窗口边框。在本指南中,我们将讨论分步说明,以帮助您在Windows操作系统中创建反映您的风格的环境。如何更改窗口边框设置?按+打开“设置”应用。WindowsI转到个性化,然后单击颜色设置。颜色更改窗口边框设置窗口11“宽度=”643“高度=”500“&gt;找到在标题栏和窗口边框上显示强调色选项,然后切换它旁边的开关。若要在“开始”菜单和任务栏上显示主题色,请打开“在开始”菜单和任务栏上显示主题

如何在 Windows 11 上更改标题栏颜色?如何在 Windows 11 上更改标题栏颜色?Sep 14, 2023 pm 03:33 PM

默认情况下,Windows11上的标题栏颜色取决于您选择的深色/浅色主题。但是,您可以将其更改为所需的任何颜色。在本指南中,我们将讨论三种方法的分步说明,以更改它并个性化您的桌面体验,使其具有视觉吸引力。是否可以更改活动和非活动窗口的标题栏颜色?是的,您可以使用“设置”应用更改活动窗口的标题栏颜色,也可以使用注册表编辑器更改非活动窗口的标题栏颜色。若要了解这些步骤,请转到下一部分。如何在Windows11中更改标题栏的颜色?1.使用“设置”应用按+打开设置窗口。WindowsI前往“个性化”,然

OOBELANGUAGE错误Windows 11 / 10修复中出现问题的问题OOBELANGUAGE错误Windows 11 / 10修复中出现问题的问题Jul 16, 2023 pm 03:29 PM

您是否在Windows安装程序页面上看到“出现问题”以及“OOBELANGUAGE”语句?Windows的安装有时会因此类错误而停止。OOBE表示开箱即用的体验。正如错误提示所表示的那样,这是与OOBE语言选择相关的问题。没有什么可担心的,你可以通过OOBE屏幕本身的漂亮注册表编辑来解决这个问题。快速修复–1.单击OOBE应用底部的“重试”按钮。这将继续进行该过程,而不会再打嗝。2.使用电源按钮强制关闭系统。系统重新启动后,OOBE应继续。3.断开系统与互联网的连接。在脱机模式下完成OOBE的所

Windows 11 上启用或禁用任务栏缩略图预览的方法Windows 11 上启用或禁用任务栏缩略图预览的方法Sep 15, 2023 pm 03:57 PM

任务栏缩略图可能很有趣,但它们也可能分散注意力或烦人。考虑到您将鼠标悬停在该区域的频率,您可能无意中关闭了重要窗口几次。另一个缺点是它使用更多的系统资源,因此,如果您一直在寻找一种提高资源效率的方法,我们将向您展示如何禁用它。不过,如果您的硬件规格可以处理它并且您喜欢预览版,则可以启用它。如何在Windows11中启用任务栏缩略图预览?1.使用“设置”应用点击键并单击设置。Windows单击系统,然后选择关于。点击高级系统设置。导航到“高级”选项卡,然后选择“性能”下的“设置”。在“视觉效果”选

Windows 11 上的显示缩放比例调整指南Windows 11 上的显示缩放比例调整指南Sep 19, 2023 pm 06:45 PM

在Windows11上的显示缩放方面,我们都有不同的偏好。有些人喜欢大图标,有些人喜欢小图标。但是,我们都同意拥有正确的缩放比例很重要。字体缩放不良或图像过度缩放可能是工作时真正的生产力杀手,因此您需要知道如何对其进行自定义以充分利用系统功能。自定义缩放的优点:对于难以阅读屏幕上的文本的人来说,这是一个有用的功能。它可以帮助您一次在屏幕上查看更多内容。您可以创建仅适用于某些监视器和应用程序的自定义扩展配置文件。可以帮助提高低端硬件的性能。它使您可以更好地控制屏幕上的内容。如何在Windows11

10种在 Windows 11 上调整亮度的方法10种在 Windows 11 上调整亮度的方法Dec 18, 2023 pm 02:21 PM

屏幕亮度是使用现代计算设备不可或缺的一部分,尤其是当您长时间注视屏幕时。它可以帮助您减轻眼睛疲劳,提高易读性,并轻松有效地查看内容。但是,根据您的设置,有时很难管理亮度,尤其是在具有新UI更改的Windows11上。如果您在调整亮度时遇到问题,以下是在Windows11上管理亮度的所有方法。如何在Windows11上更改亮度[10种方式解释]单显示器用户可以使用以下方法在Windows11上调整亮度。这包括使用单个显示器的台式机系统以及笔记本电脑。让我们开始吧。方法1:使用操作中心操作中心是访问

如何修复Windows服务器中的激活错误代码0xc004f069如何修复Windows服务器中的激活错误代码0xc004f069Jul 22, 2023 am 09:49 AM

Windows上的激活过程有时会突然转向显示包含此错误代码0xc004f069的错误消息。虽然激活过程已经联机,但一些运行WindowsServer的旧系统可能会遇到此问题。通过这些初步检查,如果这些检查不能帮助您激活系统,请跳转到主要解决方案以解决问题。解决方法–关闭错误消息和激活窗口。然后,重新启动计算机。再次从头开始重试Windows激活过程。修复1–从终端激活从cmd终端激活WindowsServerEdition系统。阶段–1检查Windows服务器版本您必须检查您使用的是哪种类型的W

See all articles

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

뜨거운 도구

DVWA

DVWA

DVWA(Damn Vulnerable Web App)는 매우 취약한 PHP/MySQL 웹 애플리케이션입니다. 주요 목표는 보안 전문가가 법적 환경에서 자신의 기술과 도구를 테스트하고, 웹 개발자가 웹 응용 프로그램 보안 프로세스를 더 잘 이해할 수 있도록 돕고, 교사/학생이 교실 환경 웹 응용 프로그램에서 가르치고 배울 수 있도록 돕는 것입니다. 보안. DVWA의 목표는 다양한 난이도의 간단하고 간단한 인터페이스를 통해 가장 일반적인 웹 취약점 중 일부를 연습하는 것입니다. 이 소프트웨어는

에디트플러스 중국어 크랙 버전

에디트플러스 중국어 크랙 버전

작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

맨티스BT

맨티스BT

Mantis는 제품 결함 추적을 돕기 위해 설계된 배포하기 쉬운 웹 기반 결함 추적 도구입니다. PHP, MySQL 및 웹 서버가 필요합니다. 데모 및 호스팅 서비스를 확인해 보세요.