#47321 [Com]: (trivial) Consistency in type juggling examples
ID: 47321
Comment by: news at unleashedmind dot com
Reported By: php at webchick dot net
Status: Open
Bug Type: Documentation problem
Operating System: N/A
PHP Version: Irrelevant
New Comment:
Don't get us wrong, please. This is a real issue or us, as we're
trying to settle with a coding-standard for this syntax.
Previous Comments:
------------------------------------------------------------------------
[2009-02-06 00:14:55] php at webchick dot net
Description:
------------
This is *incredibly* trivial, but... ;)
In the type casting section of the "Type Juggling" page
http://us.php.net/manual/en/language.types.type-juggling.php,
there are
four examples of how to do casting with (type):
<?php
$bar = (boolean) $foo;
...
$foo = (int) $bar;
...
$binary = (binary)$string;
...
$fst = (string) $foo;
?>
Is it possible to change "(binary)$string;" to "(binary) $string;"
(with a space) so that it is consistent with the other examples?
This came about because we were discussing Drupal's coding standards at
http://groups.drupal.org/coding-standards-and-best-practices
and we were
looking to PHP.net for guidance. The guidance is pretty clear, except
for this one inconsistency.
My inner neat-freak thanks you. :)
Reproduce code:
---------------
N/A
Expected result:
----------------
N/A
Actual result:
--------------
N/A
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47321&edit=1
Thread (5 messages)