【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>

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

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

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

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

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

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

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

在iOS17中,Apple为其移动操作系统引入了几项新的隐私和安全功能,其中之一是能够要求对Safari中的隐私浏览选项卡进行二次身份验证。以下是它的工作原理以及如何将其关闭。在运行iOS17或iPadOS17的iPhone或iPad上,如果您在Safari浏览器中打开了任何“无痕浏览”标签页,然后退出会话或App,Apple的浏览器现在需要面容ID/触控ID认证或密码才能再次访问它们。换句话说,如果有人在解锁您的iPhone或iPad时拿到了它,他们仍然无法在不知道您的密码的情况下查看您的隐私


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

Atom編輯器mac版下載
最受歡迎的的開源編輯器

Dreamweaver CS6
視覺化網頁開發工具

Safe Exam Browser
Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

MantisBT
Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。

禪工作室 13.0.1
強大的PHP整合開發環境