|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-07-05 23:12 UTC] ed at takken dot us
Description: ------------ On page: https://bugs.php.net Made sure you are using the latest stable version should be: Make sure you are using the latest stable version On page: http://php.net/manual/en/function.mysql-query.php For conditional tense, do not use: it will try to create one as if mysql_connect() was called Instead use: it will try to create one as if mysql_connect() were called Test script: --------------- On page: https://bugs.php.net Made sure you are using the latest stable version should be: Make sure you are using the latest stable version On page: http://php.net/manual/en/function.mysql-query.php For conditional tense, do not use: it will try to create one as if mysql_connect() was called Instead use: it will try to create one as if mysql_connect() were called PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 13:00:01 2025 UTC |
Sometimes I hate this language... and by that I mean English, of course. Conditional, sure, but were/was is a matter for present unreal conditional tense ("were" grammatically correct, "was" used in conversational English), and here I think it's more of a past unreal conditional. I haven't seen any examples of was/were used with the latter - most saying "had been" instead. But past/present itself is debatable: while it's clear that the sentence is referring to behavior that mysql_query will perform (future simple), it could be suggesting that the behavior promises a result equivalent to the developer having called mysql_connect previously (past unreal conditional) or it could be suggesting that the function will behave as if mysql_connect was being called at that moment (present unreal conditional). Both of those are true. Actually, "present unreal conditional" isn't quite the case. PHP effectively *does* call mysql_connect, albeit by way of the internal C functions rather than literally the developer-facing "mysql_connect" function (with only a handful of layers of indirection involved). So you could say that it's present real conditional because PHP is, in fact, calling mysql_connect at that time, thus making the action "real". And that "future simple" from earlier? That's debatable too as it can vary based on how you* view the documentation: do you look to the documentation to tell you how mysql_query will behave when you call it, or do you look to see what mysql_query would do if you were to use it? The former is future simple** while the latter is future real conditional***. (* And by "you" I mean the informal impersonal pronoun. Not specifically @ed or @cmb or the reader of this absurdly long comment.) (** Assume that the code which calls mysql_query has already been written. This could be present real conditional except the code is not actually executing at the moment (unless you're stepping through it with a debugger at that moment...). It could be future real conditional except the very fact that you're writing the code implies that the code will, in fact, execute in the future - perhaps not every time, but it is certain that it will sometime. That said, it could be future conditional if you were to also simultaneously consider the context of your use of the function and thus any potential conditional logic involved. Regardless, I thus conclude it's future simple.) (*** That may seem weird since one's use of the function is not yet established, but English has this awkward thing where future real conditional covers pretty much all the future conditional usages, reserving future unreal conditional for situations where the speaker wants to draw attention to an impossible premise.) My vote is for not wasting any more time on the clusterf*** that is English grammar and its tenses. Or, if something really has to be done, then to go for "had been".