From a14c9a2518d89ffc9437f0b6e0bfce7caa881717 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Tue, 17 Jul 2018 14:03:55 +0200 Subject: [PATCH] Update page 'P# 1.0 Draft Specification' --- P%23-1.0-Draft-Specification.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/P%23-1.0-Draft-Specification.md b/P%23-1.0-Draft-Specification.md index 47b7485..57687d4 100644 --- a/P%23-1.0-Draft-Specification.md +++ b/P%23-1.0-Draft-Specification.md @@ -162,6 +162,16 @@ P# have standardized integers, which are stored in 8 bytes (64 bits) regardless ### 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 $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 An object pseudo type is used for storing a pointer to the object.