From 40378a3f2be5e46bff692a30de169bb03307172c Mon Sep 17 00:00:00 2001 From: Daniel Convissor Date: Tue, 14 Apr 2009 14:53:47 +0000 Subject: [PATCH] * Add text and example regarding bindec() interpreting input as unsigned integers. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@278697 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/math/functions/bindec.xml | 120 +++++++++++++++++++++++++++- 1 file changed, 119 insertions(+), 1 deletion(-) diff --git a/reference/math/functions/bindec.xml b/reference/math/functions/bindec.xml index 6e96b0bd1a..7c63d94802 100644 --- a/reference/math/functions/bindec.xml +++ b/reference/math/functions/bindec.xml @@ -1,5 +1,5 @@ - + bindec @@ -19,6 +19,13 @@ bindec converts a binary number to an integer or, if needed for size reasons, float. + + bindec interprets all + binary_string values as unsigned + integers. This is because bindec sees + the most significant bit as another order of magnitude + rather than as the sign bit. + &reftitle.parameters; @@ -87,6 +94,117 @@ echo bindec('111'); 51 51 7 +]]> + + + + + + <function>bindec</function> interprets input as unsigned integers + + +]]> + + &example.outputs.32bit; + + + + &example.outputs.64bit; + +