I don't think your suggestion explains the feature any better than
strict_types. (Although the irony of using =1 instead of =true isn't
lost on me!)
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
is
irrelevant. The type checking mode depends on the file where the
function is called."
If it were the other way around, then you'd be correct -- it would be
a disaster.
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
appeal to this.)
3) In rare cases, Gaming the system - closing the vote at the exact
time that benefits the owner of the RFC.
So I don't think there's anything sinister here. It's just the natural
result of the voting rules.
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
work they have put into their proposals. So big
thanks to all of you!)
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
able::fromInstance($dateTimeImmutable) could just return
the same object.)
So while not a pressing issue, I do think a more straightforward way
of converting would be good because the reality is that you're going
to need to do the conversions at some point if you interface with
other pe
e clear, I'd actually be fine with a weak-only implementation that
follows the same exact rules as the explicit casts. And I'm okay with
strict-mode optionally tacked on top of that -- because it can be
useful and won't get in my way. But I'm no longer in favor of any
in-between co
ed, maybe $foo would just be a
ReflectionClass object. (I haven't really thought that one through...)
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
fair IMO is to hold a vote where you rank those
four options (weak, strong, both, neither) and hold an instant run-off
vote where the first majority wins. And if 'neither' wins, then agree
that the topic cannot be revisited until next major version, so that
everybody can rest for 5 years. ;)
-
ed on.
Policy states that 2/3s means consensus on core language changes. The
current 63.5% isn't too far from that. Just curious, but do you have a
different number in mind for this vote? 90%? 80%?
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe,
PERDIR setting, then I wouldn't really mind as much.
But as PHP_INI_USER, I don't like it at all.
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
using
multiple libraries and they are each overriding their (and your)
settings? It just feels messy.
The same thing could be accomplished config-less with a callback
system that is triggered on script includes (if any callback returns
false, an error is thrown), but I think I'd dislike that
ally works in practice? But a library with type-hints + a script
to prepend "use strict" to every PHP file would make testing impact on
real-world usage easy for anybody.
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
types
is far preferred to nothing. There are good arguments on both sides
... let the voters decide.
After that, additional RFCs could be created to address raising errors
on auto case, using declares to toggle behavior, etc - depending of
course on what was decided on prior vote.
--
Matthew
s. Because I
wouldn't want to have two different styles of code depending on the
library I'm using, I'd end up again going back to assuming everything
was a strict type.
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
) { } == f( (int) $a); -- with NO notices
2) function f(int $a) {} means $a must be exactly type int -- or
recoverable error is thrown
3) current behavior (no scalar type hints)
But a new set of rules that require a 23x7 table to describe what's
going on ... not a big fan.
--
Matthew Le
l it is to optimize that away to nothing, but
it would be more consistent with regard to throwing exceptions and
would allow for a variety of different class methods.
--
Matthew Leverton
On Sun, Oct 20, 2013 at 8:52 PM, Joe Watkins wrote:
> On 10/20/2013 12:15 AM, Ferenc Kovacs wrote:
>>
h adds useless overhead.
There are a few keywords, such as list and unset, that I often wish I
could use in PHP. So in terms of readability, I think any sane
programmer would use this proposed functionality for good...
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
=> 'override');
Now is 'c' overridden or 'd'?
So I'll give this issue a rest unless somebody wants to further
discuss what the concrete syntax might look like.
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, Sep 6, 2013 at 8:56 PM, Ryan McCue wrote:
> Matthew Leverton wrote:
> This is already the case. In libraries that accept options via an array,
> those array keys are pretty much set in stone (although you can map them
> if you need to change a key).
>
The big differen
eters are set in stone before this feature would go live?
So I'm neutral to this proposal, as I would never purposefully build a
function that is so convoluted that it needs named parameters, but I
understand that's how some people like to write code, and it could be
useful in extreme case
dismissive of your complaints (because
they are valid), I just don't see how two bandaids over specific
instances of a larger problem do much good. Although, to be pragmatic,
I offered what I feel is a better solution than your extra functions.
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
& current behavior),
CRC32_INT32 (always negative if high bit is set), CRC32_UINT32_STRING,
CRC32_HEX_STRING
Forgive the poor names.
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
ar)
I assume that function fn($a, $b = null, ...$c) is possible, and the
only way to populate $c is to call fn with three or more parameters.
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
th the powers-to-be doing whatever they feel appropriate.
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
uction web server.
--
Matthew Leverton
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
. See
http://www.red-team-design.com/firefox-doesnt-allow-cross-domain-fonts-by-default
The attached patch unconditionally sets it for all static files.
Should I submit a bug report, or is this email sufficient to get
somebody to look at it?
--
Matthew Leverton
--
PHP Internals - PHP Runtime Develo
26 matches
Mail list logo