« first day (1585 days earlier)      last day (3376 days later) » 

9:00 PM
If you do a covariant or contravariant inheritance (but not in an abstract class or interface implementation though) then you get an E_STRICT.
The covariant case is clearly an error.
Changing ALL parameter inheritance to force invariant compliance could theoretically break anyone doing contravariance (which we haven't advertised as valid but generally is considered to be).
 
@NikiC +1. I think Stas' strategy is "attack is the best defense", so if the author gives up after a simple shot across the bow, it probably wasn't worth to propose it :)
 
@NikiC and @Charles I have updated the Proposal section and removed the confusing line about "future RFC" stuff.
 
@LeviMorrison Might want to change the "anything without a __construct will not work" wording. It'll still "work," it'll just not work as expected because the old-style constructor won't get called.
 
9:16 PM
@Charles How's it look now? wiki.php.net/rfc/…
 
@LeviMorrison Beautiful.
If I may suggest one more change - in the inheritance case, I'm assuming that the initial declare of the Filter class will behave as in the original example? This is not noted in the example code.
 
hey all
 
@DaveRandom I was told to hassle you to get github.com/DaveRandom/LibDNS/pull/4 merged and tagged. ASAP.
 
heya
 
Already regretting taking up Scalar Type Hints
 
9:37 PM
@Sara :-P
 
@Sara yeah, you took the wrong version :-P
 
wrong language
 
wrong planet
 
@Sara Well, looks like François would happily like to take it
 
@m6w6 to its grave with the current line of thinking (IMHO)
 
9:42 PM
hehe
 
yeah… I'm not sure what François' goal is at all…
 
I think "get something passed"
or perhaps he thinks he can find the perfect compromise
(more power to him, but many have tried and failed - including myseflf)
Andrea's was the first that people actually rallied behind
> If you can't see it after so much was written on the subject, what can we do ? Do you imply that, if you cannot understand the need, it does not exist ?
 
Maybe I bribed him to drive the discussion ad absurdum
him and Lester
 
@m6w6 where do you live again? :-X
 
9:49 PM
far too eastern, so good night ;)
 
@Machavity The force is not strong with this one ...
 
@m6w6 Good night then :-)
 
Wrong week to stop sniffing glue.
 
@Sara is this a plan to have a lot of functions zpp-style and a lot with concrete types… which will eventually make it a pain in the versions where conversion happens?
@Sara I just hope you don't try to push this into 7.0? Later versions are fine, but it's too late for 7.0 IMO.
@Sara not sure, but e.g. boolish is nothing else than a weak bool. Which is giving the callee the possibility to decide between weak and strict again?
 
10:22 PM
@Sara speaking openly, doesn't leaving internal functions untyped mandate that they remain untyped forever (due to BC)?
 
good point.
 
I don't think mixing weak/script scalar type hints is going to benefit us in the long run, and going strict all the way is going to piss off a LOT of people, whereas weak scalar type hints kinda suck, so I don't really see this happening, although I'd love it
 
> I don't think mixing weak/script scalar type hints is going to benefit us in the long run
can you elaborate on why?
 
well its somewhat confusing and people don't seem to like the declare syntax (for syntactic sugar reasons)
same goes for <?php strict IMO
 
but why does that make a difference long-run vs not?
 
10:31 PM
I assume you mean now, well I don't know, gut-feeling
seems "hacky"
changing the behavior of a lot of functions at runtime
 
@Sara If seems like all v0.3 needs to pass is changing the declare semantics (i.e. only allow declare once at the top of a file). Couldn't other things like a numeric type hint or union types come later?
 
@TheodoreBrown currently, we could add a lot of these to return types first and then reflect behavior to params with eventual minor changes.
 
@ircmaxell I'd be fine with the RFC (I have no vote anyway) I just don't think its the holy grail yet
 
@ircmaxell Potentially, but it's the best I have in terms of compromise with Rasmus' legitimate objections
@TheodoreBrown I want better than passing. I want Ze'ev and Rasmus on board.
 
@Sara I'm not saying that as a bad thing or not, just want to understand better
 
10:37 PM
@ircmaxell Nod. I think it's an okay thing for them to never have types, though I'd like to encouraging more typing over time.
 
@LeviMorrison thus, the third vote in the RFC
 
I just don't think this Scalar Type Hint situation can be solved fancy in a step-by-step mannrr
can't fix my typo; mobile..
 
@Marcel I wish it could be a bit all at once, but I don't think that'll ever sell
 
@Sara that'd be an interesting problem to work out...
 
10:42 PM
yeah.. me neither, I fear if php were to go scrict typing all the way, the project would get forked with weak typing back and that forks adoption rate would be higher than php7
 
@SomeKittens sigh
@MarcelBurkhard nobody is saying go strict all the way
not even the strict proposals said that
 
I know, but that would IMO be the best long-term solution (well if people would adopt it)
 
-1
 
@SomeKittens Another satisfied customer...
Morning all
 
Morning
 
10:47 PM
@SomeKittens Jeff said "We will look into this". Be careful!
 
Yeah, that was the warning
/me could have written the initial warning better
 
@ircmaxell well it wouldn't be php anymore, and weak typic obviously has both advantages and disadvantages, but I think introducing strict types (through declare or <?php strict) for the internal functions affected but at the same time having type-changing variables is a little weird, no?
but thats just my uneducated opinion ^^
and I'm a little biased with my java "background"..
 
maybe I got it all wrong? what would happen here:
<?php declare('strict_types=1');
$foo = 1;
$foo = "test".$foo;
$bar = "2"+2;
 
@ircmaxell Well said, better than I could.
 
10:54 PM
@ircmaxell inb4 @ircmaxell gets shit for being a circle jerk :(
 
@MarcelBurkhard Nothing new.
 
Anyone come across php setcookie() not overwriting existing cookies before? I'm using the same code in both places but different content and it overwrites like 50% of the time?

setcookie('rememberme', $cookie, time()+60*60*24*30, "/", "domain.com", true);
 
@MarcelBurkhard Nothing because there are no function calls or typehints involved.
 
@MarcelBurkhard nothing would change
 
@Silver89 Enable error reporting
 
10:55 PM
thats what I thought
I think it should throw an error as soon as strict types are enabled...
but I know thats not feasible
 
@PeeHaa I've created an fopen logging system but it's hard to diagnose when it's only happening a small percent of the time, is it safe to do if(setcookie()) return true?
 
I want to write this in ycombinator but don't have an account and am not going to make one just for it:
Almost certainly this is PHP code, since [cv-pls] is almost exclusively a Room 11 thing. Furthermore, there have already been two meta questions about this specific concern: meta.stackoverflow.com/questions/256501/… and meta.stackexchange.com/questions/120275/…. Please refer to these before reading anything else in this message.

To be frank the vast majority of new PHP questions are bad. They are duplicates, they are incredibly specific, or are simple syntax errors -- an
 
thus I don't like the strict type scalar hints thingy and would just go with the weak ones
 
@Silver89 you can use headers_list and parse the set-cookie header... but really, it's just better if you only set it once
 
10:58 PM
@FlorianMargaine It's somewhat late and I'm tired. Can you give me the gist or ELI5 to me? :)
 
@PeeHaa right now it's silent
if you use setcookie twice with the same name
 
@ircmaxell Hey, link to this one too: meta.stackexchange.com/questions/120275/…
 
what about using unset on the cookie before resseting it?
 
@FlorianMargaine Oooooh @Silver89 is doing it in the same request?
 
that was my guess, yes
 
11:00 PM
@LeviMorrison Other rooms use the cv pls tag though
 
@Silver89 Won't help
 
@LeviMorrison done
 
it's a remember me cookie, so basically it's set on login and then the value / token is refreshed every 30 minutes or oso
 
That feeling. When you tried to track down a bug for hours in the most recent tag… until you see that it was fixed in master but not yet tagged. (Reasons why we should use dev-master in composer.json, even if this should be a bad idea…)
 
@Silver89 So you don't actually set it multiple times during the same request?
 
11:01 PM
but it's only resetting the cookie a random amount of the time so it's failing
 
@PeeHaa Because we were so gracious as to bring it to them :)
 
no
 
@LeviMorrison :-)
 
Has it ever been brought up as an option to just use type hints like so: int, strict_int, numeric, strict_numeric, etc.. ?
 
@Silver89 I would really enable error reporting, because I am fairly sure you have an issue with the fact headers ar already sent somehow.
Note: this is just me guessing
 
11:03 PM
@MarcelBurkhard Yes, although with different syntax ... I'm all for it.
 
@Sara It would be great to get Zeev and Rasmus on board, but I'm worried that if their proposals are implemented (e.g. making strict mode "less strict" or not applying it to internal functions) the RFC may lose support from others.
 
okay thanks will give that a try, can't think of any other reason
is there anyway to test in php if headers have been sent?
 
@Silver89 yes you enable error reporting
 
@Silver89 You could try to use header('Set-Cookie: ...', true); to replace a previous Set-Cookie header
 
@PeeHaa Also, to some degree the flood has stopped here because we have dupe hammers.
 
11:04 PM
@PeeHaa it's a stupid rant that only thinks through 1/2 of the side (the author's side)
 
(I mean, a lot of us do (I don't))
 
@Narf me too, seems both more flexible AND consise to mee
 
But really enable error reporting when developing
 
@TheodoreBrown My compromise on that is that strict WILL apply to internal functions, just not in the way that Andrea proposed.
 
11:04 PM
me*
 
i.e. Based on ZEND_ARG_INFO, rather than zend_parse_parameters() declarations
 
@ircmaxell Yeah they all are :(
 
It basically starts everything off on the same foot. Support for scalar types, but effectively none of them defined yet.
 
@PeeHaa I'd just tell him to look at the response headers in his browser tbh...
 
@Sara I've always wondered why we had arg info for internal functions when they used ZPP anyway.
(Answer has something to do with reflection historically I think)
(and maybe inheritance stuff)
 
11:06 PM
@FlorianMargaine not that easy an a production site when it takes 30-60 minutes for it to occur, need a fastest response
 
@FlorianMargaine That doesn't hurt, but if my guess is right enabling error reporting shows OP exactly what and where he has a problem
 
I guess I don't understand the thing
 
@SomeKittens My two cents - news.ycombinator.com/item?id=9065721 which I've managed to get in the middle of the page where no one will see it.
\o/
 
@LeviMorrison Arg names mostly.
 
@MarcelBurkhard The only problem is, the last RFC sold the argument that you shouldn't be able to force strict hints on your library's users and everybody seems to be convinced in that.
 
11:09 PM
> The PHP chat room is/was quite bad in that respect and there's a small handful of particularly caustic individuals who go out of their way to spread unpleasantness for less well informed users.
someone is talking about you, @tereško
 
@Sara It always seemed like duplication of effort to me.
I define this arg_info... but then I don't use it and do ZPP instead.
 
@Sara do you mean for documentation purposes?
 
What was the endlosung about that headers thread btw @FlorianMargaine
 
@PeeHaa gave up, too much bikeshedding
 
Yeah I even gave up on reading through the end. Can't really blame you :)
 
11:10 PM
the output has to be an RFC
 
@FlorianMargaine Reflection, yeah. But also for type enforcement. zend_arg_info() is currently used for array/class enforcement
 
because BC break either way
 
yeap
 
@FlorianMargaine oh look, someone is bitching about SO again
lemme call the authorities
 
@LeviMorrison And it is, but it's not a duplication I'm adding, it's a pre-existing condition I'm taking advantage of. :)
 
11:12 PM
@Narf well as I already said I'd just go with a weak scalar type hints rfc, everything else (except for strict types all the way, which is never going to happen) is confusing
 
@MarcelBurkhard I wouldn't. :)
 
best purchase ever - elephpant
 
@Silver89 \o/
 
ah, a dreamweawer user… (the tiny Dw symbol in the taskbar)
 
> Happily this isn't Stack Overflow and this discussion hasn't been closed yet just because a few admins didn't think think it would fit within "Anything that good hackers would find interesting. That includes more than hacking and startups."
 
11:15 PM
@bwoebi You are the one who recognized it so that is also telling ;)
 
@PeeHaa rather the only one who looked that close :-P
 
do like my dreamweaver, also got the xampp and git icons there, putty, sqlyog and filezilla hiding ;)
 
@PeeHaa it's easily recognizable when zoomed in
 
@PeeHaa also, I used dreamweawer like 3 years ago…
 
right, you're young
 
11:16 PM
but since I discovered PHPStorm… :-)
 
and f.lux in the icons to the right, everyone in my office downloaded that after seeing my use it... changes your display hue in line with the sunrise / sunset at your exact location to avoid eye strain justgetflux.com
 
@bwoebi I think I have used it when it still was uhhm called something else or was from another vendor I think?
or I just made that up not sure
Ah yeah Macromedia was bought
 
Yeah dreamweaver is really expensive with Adobe but it's the best software out there imo
 
I have even used frontpage for a while :P
/me ducks for cover
 
That's from times where we didn't know any better…
 
11:19 PM
notepad++ is okay, sublime would be usable but I hate that black colour scheme and too much effort changing
 
oh yeah, 2 clicks is too much effort
 
@Silver89 I love that color scheme :)
 
the site manager in dreamweaver is really useful for local sites with xampp as well
 
11:42 PM
Hi all
 
@Silver89 you can easily change color schemes in ST
@Silver89 also, it's bullshit what you are saying about dreamweaver: it is the worst IDE out there and you even have to pay for that crap
oh , and since when even half-serious web developer are using xammp ?!?
get a VM or a VPS and build a webserver as it is intended to instead of that pre-packaged joke
</rant>
 

« first day (1585 days earlier)      last day (3376 days later) »