php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #47321 (trivial) Consistency in type juggling examples
Submitted: 2009-02-06 00:14 UTC Modified: 2009-02-06 17:19 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: php at webchick dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
 [2009-02-06 00:14 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-06 00:22 UTC] news at unleashedmind dot com
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.
 [2009-02-06 00:27 UTC] php at boombatower dot com
Consistent code standards = nice
 [2009-02-06 11:37 UTC] rquadling@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2009-02-06 17:19 UTC] php at webchick dot net
Hey, awesome! Thanks a lot! :)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 03:00:02 2026 UTC