From 20ee32ff9fdf393638ec659db8221c55661cf358 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Thu, 24 May 2007 18:46:00 +0000 Subject: [PATCH] Fixed bug#41494 (binary typecasting) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@236255 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/types.xml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/language/types.xml b/language/types.xml index 1a6b15f6b8..b3725222bf 100644 --- a/language/types.xml +++ b/language/types.xml @@ -1,5 +1,5 @@ - + Types @@ -2561,6 +2561,9 @@ $bar = (boolean) $foo; // $bar is a boolean (string) - cast to string + + (binary) - cast to binary string (PHP 6) + (array) - cast to array @@ -2569,6 +2572,9 @@ $bar = (boolean) $foo; // $bar is a boolean + + (binary) casting and b prefix forward support was added in PHP 5.2.1 + Note that tabs and spaces are allowed inside the parentheses, so the following are functionally equivalent: @@ -2579,6 +2585,17 @@ $bar = (boolean) $foo; // $bar is a boolean $foo = (int) $bar; $foo = ( int ) $bar; ?> +]]> + + + Casting a literal strings and variables to binary strings: + + + ]]>