uot; (smartcast) and "function foo(+int $i)" (strict, other char than
"plus" could possibly be used). This has two benefits to the former
syntax choices:
1) The smartcast syntax would be consistent with how the APIs are
documented in PHP's documentation, so the syntax in P
PS: Can I get a list of the PHP axioms? Seeing as that's apparently
how things are decided, it would be nice if people won't have to waste
your precious time making obnoxious feature requests that are
*clearly* against the PHP axioms.
--
Daniel Egeberg
--
PHP Internals - PHP Runtim
A default PHP
> constant would be a better way to handle such cases.
It is already constant (i.e. it's always a backslash). What do you
need a constant for? It's not system nor configuration dependent.
--
Daniel Egeberg
--
PHP Internals - PHP Runtime Development Mailing List
To
sname.
>
> Try to search "class Object{" or "class Object extends" on google codesearch.
>
> Maybe this was resolved with the last scalar type hinting patch, which
> got merged to the trunk, I don't know.
>
> ps: the spam filter rejected my previous em
the public to set expectations.
If the documentation is missing information about BC breaks, please
file a doc bug at http://bugs.php.net.
If nobody is aware that it is lacking, naturally it won't be improved.
--
Daniel Egeberg
--
PHP Internals - PHP Runtime Development Mailing List
To u
x27;d gain nothing - as
>> a matter of fact you'd lose out a bit since "abc" strings or arrays will
>> happily cast into (int), while with our proposed solution - they won't.
>
> Is a 'scalar' typehint still being considered? It doesn't seem to
use explicit types.
> For examlpe, we may add a switch in php.ini, let's say, explict_types=On/Off.
A php.ini setting is a really bad idea. Say that Library A expects it
to be On, but Library B expects it to be Off. Now what happens if I
want to use *both* Library A and Library B?
--
Danie
a: Say you ask the user how old he is (that
would be an int)? If he answers "123abc" then your validation logic
should catch that he entered an invalid value. Once you've determined
that it is a valid value, then casting to int is a non-issue.
--
Daniel Egeberg
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
hints at all.
If you don't know whether the user/database provided information you
have is correct before you pass it along to something else, I would
say that the code indeed is bad. Unless you regard "123abc" as a valid
value from your user, don't allow the user to give you that
ed to SplInt,
SplBool, etc.? These classes could maybe even be extended with method
aliases to the relevant functions in PHP's library.
--
Daniel Egeberg
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
end-user perspective, option (d) makes
most sense.
>>
>> Personally, I believe that a fatal on such prototypes error is not
>> warranted, so I'd prefer (d).
>>
>> What do you think would be the best option? Can you think of another?
--
Daniel Egeberg
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, Apr 13, 2010 at 16:21, Gerardo Benitez wrote:
> Translating the documentation
What language do you intent to translate it to?
--
Daniel Egeberg
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
12 matches
Mail list logo