From 6e9bb647ffe9b2abff9e2f2dc583f8e9eeef153f Mon Sep 17 00:00:00 2001 From: Zak Greant Date: Sun, 24 Jun 2001 05:11:35 +0000 Subject: [PATCH] Added note on behavior of is_scalar() with regards to resource type values git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@50080 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/var.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functions/var.xml b/functions/var.xml index 301233de8d..2e0af478fb 100644 --- a/functions/var.xml +++ b/functions/var.xml @@ -745,6 +745,14 @@ show_var($proteins) + + + Note that the PHP resource type is not considered a scalar value. + Andi Gutmans states: "[Resources] are abstract datatypes which + happen to be in ID (integer) form ... people should [not] count + on it being an integer as this could change one day." + + This function was added to the CVS code after the release of PHP @@ -1291,7 +1299,7 @@ foo(); <?php $a = array (1, 2, array ("a", "b", "c")); var_dump ($a); - + /* output: array(3) { [0]=>