Update page 'P# 1.0 Draft Specification'
@@ -162,6 +162,16 @@ P# have standardized integers, which are stored in 8 bytes (64 bits) regardless
|
|||||||
### 5.6. Mixed Values
|
### 5.6. Mixed Values
|
||||||
Mixed pseudo-type indicates that a variable might accept multiple (but not necessarily all) types. It is not a primitive, and thus it cannot be used as typehints.
|
Mixed pseudo-type indicates that a variable might accept multiple (but not necessarily all) types. It is not a primitive, and thus it cannot be used as typehints.
|
||||||
|
|
||||||
|
<%
|
||||||
|
mixed $var;
|
||||||
|
$var = NULL;
|
||||||
|
var_dump($var); // NULL
|
||||||
|
$var = 'Test';
|
||||||
|
var_dump($var); // string(4) "Test"
|
||||||
|
$var = 7;
|
||||||
|
var_dump($var); // int(7)
|
||||||
|
%>
|
||||||
|
|
||||||
### 5.7. Object Values
|
### 5.7. Object Values
|
||||||
An object pseudo type is used for storing a pointer to the object.
|
An object pseudo type is used for storing a pointer to the object.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user