Doc #75330 [Nab]: Incorrect word choice

From: Date: Sun, 08 Oct 2017 01:59:21 +0000
Subject: Doc #75330 [Nab]: Incorrect word choice
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15051@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75330&edit=1 ID: 75330 Updated by: peehaa@php.net Reported by: danielklein at airpost dot net Summary: Incorrect word choice Status: Not a bug Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: I am sorry, but not having time to read sentences is not a compelling reason for me. As such I am not convinced it needs to be changed. Thanks again for taking the time to write to us. Previous Comments: ------------------------------------------------------------------------ [2017-10-08 01:12:14] danielklein at airpost dot net I totally agree. If English is your first language and you already know what the sentence means, it's perfectly clear. However, I'm a busy programmer with deadlines to meet and I don't always have time to examine every nuance of every sentence. I misunderstood the sentence long enough to write a bug report about it, and it took me half an hour to realise that it was already *technically* correct. Making it clearer would benefit everybody. Alternatively, you could comment it! After all, that's what we do with unclear code! ------------------------------------------------------------------------ [2017-10-07 00:25:16] peehaa@php.net Thank you for taking the time to write to us, but this is not a bug Imo it's clear as it is as it's (T_STRING) in parentheses. ------------------------------------------------------------------------ [2017-10-07 00:09:33] danielklein at airpost dot net I just realised it means "the last of all the tokens", not "the last T_STRING token". I think it would be better as "the last T_STRING token" or "the second T_STRING token". ------------------------------------------------------------------------ [2017-10-06 23:36:28] danielklein at airpost dot net Description: ------------ --- From manual page: http://www.php.net/function.token-get-all --- Example #3 token_get_all() on a class using a reserved word example <?php $source = <<<'code' <?php class A { const PUBLIC = 1; } code; $tokens = token_get_all($source, TOKEN_PARSE); foreach ($tokens as $token) { if (is_array($token)) { echo token_name($token[0]) , PHP_EOL; } } ?> The above example will output something similar to: T_OPEN_TAG T_WHITESPACE T_CLASS T_WHITESPACE T_STRING T_CONST T_WHITESPACE T_STRING T_LNUMBER Without the TOKEN_PARSE flag, the *penultimate* token (T_STRING) would have been T_PUBLIC. ---- The word "penultimate" is incorrect here. "penultimate" means "second to last", therefore it refers to "A", not "PUBLIC". While "ultimate" is more accurate, the word "last" or "final" would be a better choice here. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75330&edit=1

« previous php.doc.bugs (#15051) next »