c The strlen function number "\" to determine whether the string is over, what about PHP?
Reply to discussion (solution)
The PHP variable is a C-language structure,
Can you explain it in detail? I don't know much.
The string in PHP is implemented as a array of bytes and an integer indicating the length of the buffer.
PHP is written in C + +, it should also use "\ n"
The variable structure of PHP is as follows:
typedef struct _ZVAL_STRUCT Zval;typedef Union _zvalue_value { long lval; /* Long value */ double dval; /* Double value */ struct {/ * String type */ char *val; int len; } STR; HashTable *ht; /* Hash Table value */ zend_object_value obj;} zvalue_value; struct _zval_struct {/ * Variable information */ zvalue_value value; /* Value */ zend_uint refcount__gc; Zend_uchar type; /* Active type */ Zend_uchar is_ref__gc;};
And then you get the idea.
PHP variables have a save string length, so you don't need to use symbols to judge
Thank you,!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.