From c565fb8405bb421734b426a27a5e9b5df5512bb5 Mon Sep 17 00:00:00 2001 From: Jeroen van Wolffelaar Date: Sun, 28 Oct 2001 18:47:39 +0000 Subject: [PATCH] Add tip about investigating types of expressions to first page of types section. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@61022 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/types.xml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/language/types.xml b/language/types.xml index 424846d9b6..fadfb8756d 100644 --- a/language/types.xml +++ b/language/types.xml @@ -1,5 +1,5 @@ - + Types @@ -104,6 +104,20 @@ rather, it is decided at runtime by PHP depending on the context in which that variable is used. + + + If you want to check out the type and value of a certain expression, use + var_dump. + + + If you simply want a human-readable representation of the type for + debugging, use gettype. To check for a certain type, + do not use gettype, but use the + is_type functions. + + + If you would like to force a variable to be converted to a certain type, you may either