« first day (2350 days earlier)      last day (2591 days later) » 

2:11 PM
@Gordon the other way round.
 
2:26 PM
IntlDateFormatter->format() doesn't return microseconds/fractions – #74298
 
Hello
 
@PeeHaa I live in a city, so it's not the same, but yeah, that happens
 
hello guys, does anyone here knows how form requests work on laravel?
i have this issue, can't figure it out : stackoverflow.com/questions/42976062/…
 
we dont do laravel here
 
People still using laravel?
 
2:41 PM
the laravel chat is kind of boring, no1 is there xD
 
Kal
Hey Peeps, I am using setcookie/setrawcookie. If I omit the domain param then it sets but if I put a domain it doesn't set :/
 
yeah, i guess
 
Kal
setrawcookie(
$authGroupData['cookieName'],
$sid,
REQUEST_TIME + $authGroupData['sessionTimeToLiveSeconds'],
"/",
$authGroupData['domain']
);
doesn't work
setrawcookie(
$authGroupData['cookieName'],
$sid,
REQUEST_TIME + $authGroupData['sessionTimeToLiveSeconds'],
"/"
);
works
 
what doesn't work
 
!!notworking
 
2:41 PM
Nov 15 '14 at 23:43, by Danack
Do you mean it stays at home eating cheetos and play xbox?
 
Kal
setrawcookie(
$authGroupData['cookieName'],
$sid,
REQUEST_TIME + $authGroupData['sessionTimeToLiveSeconds'],
"/",
$authGroupData['domain']
);
that doesn't work
 
!!notworking
ah
 
Kal
but if I omit the domain it does
 
Still have no idea what is not working because 'not working' is to broad
 
Anonymous
@Jeeves you ok bud?
 
2:42 PM
@JayIsTooCommon I need you.
 
Same message limit probably
 
Anonymous
ah
 
Kal
the cookie is not being set with that example
if I omit the domain the cookie is then set when I inspect in browser
 
Have you enabled cookies for that domain?
 
@Kal Did you check the domain aganist the domain you are on?
 
2:43 PM
Are you working on localhost?
 
Kal
I am
 
Localhost doesn't accept cookies
 
Kal
chrome normally shows all domains
ah awks
 
You need to work on a online environment to test your cookies :)
 
Kal
ok that makes sense
 
2:44 PM
@C0dekid bullshit
 
wat
 
Kal
thanks sorry for not being very specific, I am shite at explaining stuff
 
Why would localhost not support cookies?
 
@tereško I'm speaking from experience
had the same issue a week ago
 
@C0dekid then you obviously lack it
 
2:45 PM
Is that localhost the loopback address or a FS URI?
 
no
I made a simple cookie with PHP and it keeps deleting the cookie
 
@C0dekid If localhost didn't support cookies, any sort of local development would have been impossible.
 
I can see it somehow not working with the file:/// scheme
 
The simplest login forms would fail.
 
But localhost
 
2:46 PM
Yeah I know
But I had the same issue
 
@C0dekid go and get more experience, because you seem to be clueless
 
The cookie was set, but after refresh the cookie was gone
Than I used the same script on a online environment and the cookie stayed
But this is not my business
 
@Kal are you seeing the response header being sent?
 
I am always scared to trust the browser with the session/cookies 100%
 
Kal
I'm not returning a response (I would use the symfony response header set cookie) to normally do this but this is a drupal app
 
2:48 PM
@Alesana Hell, a server-side session doesn't even make sense, particularly
When you think about it, how the hell is the server supposed to know what a session is?
 
Kal
and setrawcookie isn't doing the job, If I omit the domain it shows up in chrome inspector if I include the domain it's not set/not visible?
 
@MadaraUchiha Right that's why when I was first learning what a session was I was really skeptical on how it worked. I was thinking "Wouldn't every time PHP runs a script be it's own session?"
 
@Kal I was asking about HTTP response in the browser. You should be seeing Set-Cookie header
 
@Alesana Even in server-sides with persistent memory, like NodeJS or Java
The server has no idea whether a session has actually ended or not
It can provide a timeout and hope for the best
The client has much better tools to know whether a session is in effect or not
 
unserialize accepts two plus/minus signs for float number exponent part – #74300
Going into under the hood of PHP – #74299
 
Kal
2:52 PM
let me check the reponse tab
nb: the domain I'm setting won't be the same as the one I am on
 
how much "not same" ?
are you setting a cookie for a subdomain?
or are you trying to change my gmail cookies?
 
@MadaraUchiha Can a server-side script interact with any client-side session tools that track sessions without cookies?
I don't know if that question made sense
 
@Alesana Yes, but whyyyyyy
 
@Alesana The client would have to cooperate.
But then again, that wouldn't make too much sense either.
The server still needs to send some sort of verifiable auth token to the client
So that it knows what information it may/may not send.
 
@peeHaa I can't think of any use cases but it would be good to know.
 
2:55 PM
But the session should generally be purely client-side.
For example: Say you have a shopping cart.
 
Right, but it could let the PHP script know that the session has ended so PHP could destroy it
 
Kal
@ter
@tereško Set-Cookie:oo_session=NDHlP0AwckYk48gEwUgHPXyJ3_b4SmDQ5CePFNzlXhU; expires=Thu, 23-Mar-2017 15:24:39 GMT; Max-Age=1792; path=/; domain=my_domain.com
it's there in the headers
 
What makes more sense? For the cart to be saved server-side, and the client updates it every time it makes a change, then "checkout" is a "function without arguments" (taking the state from the server-side session variables)
 
I frequently develop a system I created using localhost on a local setup and it requires a cookie to access the system. So I can confirm that cookies do absolutely work even on a local environment
if they're set right
hi and bye /o
*flies away*
 
Kal
just cant see it in the Chrome > Inspector > Application Tab > Cookies
 
2:57 PM
Or maintaining the cart client-side, do all the price calculations at the client-side, then "checkout" is a function that accepts all the items in your cart as arguments?
@Kal ............
 
Huh that's interesting I haven't considered that
 
@MadaraUchiha Server side obviously...
 
If you're accessing it from localhost, it obviously wouldn't work if your domain is set to my_domain.com
 
It would depend on the use case I would suppose
 
@RoemerBakker Why?
 
2:58 PM
ok, but I was getting flamed by some guy
 
if anyone wants a keybase invite, lemee know.
 
@MadaraUchiha Conversion management in this case
 
ignored him, so I can't see his messages
 
@Kal and on which domain you are currently?
you said that you were attempting to set cookies for a "different domain"
 
2:58 PM
@RoemerBakker Oh, you can still report every step of the user to the server, that's not the case here though
 
Kal
but the cookie is .myofficesite.com
 
In fact, most website even use a 3rd party for conversion tracking and analytics.
 
@MadaraUchiha for one thing a cart is often associated with a user rather than a user-agent
 
@PaulCrovella And you think the server has a better feel for the user than the user agent?
 
@MadaraUchiha Also, if you do it server side you have the ability to revoke the session
i.e. if you have breaking changes in your app
or parse the session data to a new format so the user doesn't notice anything
 
3:00 PM
I was thinking of what @PaulCrovella said
 
@RoemerBakker You can do that if you do it client-side too.
 
@MadaraUchiha yes
 
I generally would like to be able to fill my cart on one computer, than move to the computer that has my CC information saved, and log in and checkout
 
@Alesana Right, but this is beyond session
That requires actual authentication to do
 
True
Right that's just saving it in a DB
 
3:01 PM
@MadaraUchiha which is why a cart is often associated with a user rather than a user-agent...
 
@MadaraUchiha and then push js to parse the data on the client side on every update that can parse to a new version? not very handy
 
Alright I'm off to physiotherapy see ya guys
 
typical php user
 
@littlepootis 😂😂
 
:-P
 
3:06 PM
@Andrea I'd rather introduce a proper delegate type, personally. Things are declared exactly as bare functions with no body and a terminating ; either with a delegate keyword or just function (identical to an interface method delc). Name is entered into the class names table. I'm going to experiment with it soon.
 
if website using hsts do i need to install separate certs for sub-domains?
 
@Kal wat
You cannot set cookies for other domains
Think about the security risk if that would be possible
 
tfw you XML schema aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhhh
 
@DaveRandom have you met our lord and savior relax ng?
 
@Linus usually. you can get wildcard certs for more $$
 
3:09 PM
@PaulCrovella Have you met the .net framework with its penchant for wasting developers' time?
 
so ... you people might know what RT news network is
 
@tereško yeah...
also wdymYp?
 
I just watched a clip where a USA senator described it as "Russian anti-propaganda outlet"
.. that tells me some interesting things about how senators view things
 
@RoemerBakker thanks doesn't letsencrypt support wildcard certs?
 
@Linus no, but if you implement it properly that's not really a big deal as all certs there are free
 
3:12 PM
@RoemerBakker thanks :)
 
@Linus No youcan enable hsts on specific subdomains
> Contract SDK Engineer - PHP (Remote OK)
le me: well that looks interesting
> We're looking for a Contract SDK Engineer to own, design and debug our Ruby and PHP libraries our customers use to interact with Rollbar from their code.
oh ruby
 
:-P
 
(those are 4 links, d'oh formatting!)
 
Can I use PHP to inject javascript into an external webpage?
 
@Dereleased you missed the point
 
3:16 PM
@JennaSloan I have no idea what that mean, but no
 
did he actually say anti-propaganda?
 
yes
 
:D
 
huh...
Do you think I can buy whatever he's smoking directly from him, or do I need to get, like, another dude's number, or what?
 
3:17 PM
Random question for 11-ers: Do you think the general public would understand what www.beverage-name.coffee means if were used on a bottled beverage label?
 
As long as there is a leading www. I am going to guess yes
 
Joe
Is the british people happy about leaving EU?
 
@Trowski I'd guess the www. gives it away, but people might be weird about the new gTLDs, I don't know how much that really enters the consciousness
I recently saw my company quietly bought one, and I thought it was a little weird at first
 
Maybe also add an internet explorer icon
 
@Trowski write Internet: in front of it
 
3:18 PM
Usually I leave off the leading www., but with any new TLD I think it's mandatory for the time being.
 
and add a QR code
 
And a photo of @DaveRandom
 
@Gordon That could help, but get's messy.
 
you could drop the www. and add http://, that should make it unambiguous
 
lol
 
Joe
3:19 PM
no one knows
 
put a slash at the end; some people will know to ignore it, and those who don't won't hurt anything
 
@Dereleased if you, as a senator, view the USA media as source of domestic propaganda, then it actually would make sense to refer to foreign source of propaganda source as "anti-propaganda" :D
 
http:// on labeling just looks ugly.
 
And nobody will understand it
tcp://www.beverage-name.coffee:80
 
hehe
 
3:20 PM
hahah
 
@Trowski that is something you're gonna want to test with actual general public people if it really matters to you
 
I like http:// it looks like the heft of a katana
 
what about a symbol ...
exactly that large
 
Missing the E dude
 
http://________________________/.jp totally looks like a blade
 
3:21 PM
 
internet explore symbol?
 
yay for IE
 
@JoeWatkins Needs to be a blue E.
 
@PeeHaa http://www.beverage-name.coffee.:80/.
 
Much better
 
3:21 PM
Yeah, there you go.
 
You're welcome @Trowski
 
that timing Joe.
 
18
Q: Should we be using the new TLDs (.coffee, .international) instead of the traditional TLDs (.com, .org)?

Kevin EvansIt seems like certain TLDs tend to have a negative connotation to them, at least among my peers, such as .info, .us, .biz. I'm not exactly sure why, but I personally don't tend to trust .biz domains and I like to avoid them as much as possible. I really like the new TLDs and I am wondering how ...

 
beverage-name.coffee; "Type This In Your Browser If You Are Unreasonably Obsessed With This Drink"
 
3:25 PM
@PaulCrovella Good thing I also own the ______coffee.com version. :-D
 
Icannotstand.coffee (not true, but its coming)
 
Thinking I should just go with that on the bottle and be done with it.
 
that'd be the easiest way to go, imo
 
bev-RAGE.coffee (type this correctly and get $1 off your next coffee)
 
3:32 PM
I think they could benefit from registering pen.island (if that exists).
If it were actually a real company that is… lol
 
I haven't finished my []() {} closure investigation but it's looking like it's doable but definitely not fun.
The more I think about arrow functions serving a niche use-case the more uncomfortable I am with it.
It definitely adds value but honestly the issue is our closure are just WAY verbose.
function use() return <- collectively that's 19 characters.
If we can capture the same semantics with fewer characters then there is no need special case single-expr closures.
 
So an alternative syntax for all closures that auto-captures?
Single-expression closures with a future scope of block bodies I think would be more likely to pass.
FWIW, I still like ^(params) => expr, but I think I'm one of the few that likes ^.
 
Just copy JS
 
3:47 PM
wat
 
hahahahah
I walked away and came back to the kicked screen
Utterly clueless what I said
:D
 
@NikiC What do you think?
 
@LeviMorrison bout what?
 
Trying to make []() {} happen vs just using some form of arrow functions?
 
3:51 PM
definitely the latter
I don't see even a slight chance of [](){} becoming a thing
 
10 years from now you think you'll still think that's the right decision?
 
yes
 
A) fn(params) => expr
B) function(params) => expr
C) ^(params) => expr
D) \(params) => expr
 
Remind me again why simply $x ~> $x * 2 or $x => $x * 2 can't be a thing?
 
@MadaraUchiha We have to move grammar and parser classes.
And => has some ambiguities.
[$x => $x * 2] // completely valid today
We already voted on ~> and it didn't pass so... yeah
 
3:58 PM
@LeviMorrison Yeah, but for what reason?
If the circumstances have changed, there's very little reason to use that as an actual argument
Although knowing internals, it almost certainly will be
 
@LeviMorrison Was there an actual vote for ~> I don't remember it...
 
@MadaraUchiha Variety. Some didn't like ~>. Some didn't like that it can't support type declarations. Some didn't like that it supported blocks too (not just exprs).
And some people just don't like the idea of the feature at all (these would still vote no, of course)
 
@Sara there was
 
Oh, I guess so, and I voted for it
 
so did I
 
4:00 PM
Just over 40%, that's brutal
 
It's enough to indicate it's wanted but low enough to indicate we need to change it fundamentally somehow.
 
@LeviMorrison Let it be noted that using ==> and not allowing blocks would already resolve two of the concerns
 
@NikiC Yes. To properly support it we would still need to move grammar/parser classes.
 
only if we want signatures ^^
 
I think they'll need to be supported to pass.
 
4:06 PM
In that case we're pretty much left with fn() ^^
Or ^(), as () seems less popular
I think those are basically the two choices
but you already know that ^^
 
Between those, fn() by far.
This isn't Perl
 
... anymore?
 
@LeviMorrison I say: Fix the issues (or, at least, the perceived issues) and revote on ~>
 
If all it takes to get short lambdas into PHP is adding a couple characters, do it.
 
also, fn(), def(), defn(), func()?
 
4:09 PM
fn()
or func() is okay I guess
 
too much Go lately? :P
 
Far too much, but that hadn't actually entered my mind there.
 
(lambda (x) (* 2 x)) ftw
 
No Python!
Or is that Ruby?
 
that's Lisp
 
4:10 PM
@Sara has been rambling a lot about the ... virtues ... of Go recently
 
Eh...
 
@Sara Lisp
 
@NikiC It has legitimate deficiencies!
 
|$x| $x + 1;
(because I'm a tease)
 
If it's any longer than two prefix characters we may as well just use function.
 
4:10 PM
((if that's how it's spelled, curse my phone's shitty autocorrect))
 
@FlorianMargaine BTW, did you know that you could use a (lambda) expression in place of any symbol that refers to a function? :o
 
@Leigh It's a real choice that did not seem to be well received when suggested on list.
 
@MadaraUchiha yes
 
((lambda (x) (* 2 x)) 2) => 4
 
4:11 PM
That's pretty neat
 
I know, I don't particularly like it either, but I knew it would get your juices flowing :p
 
I didn't know that, no
that's nice
but it's obvious now that I see it
 
@MadaraUchiha Why would one not expect that to work?
 
@NikiC Because it doesn't work in pretty much any other language?
 
It doesn't?
 
4:12 PM
@MadaraUchiha it works in JS, at least
 
Isn't that essentially (function($x) { return 2*$x; })(2), which works even in PHP?
 
@FlorianMargaine Hmm, right
 
@NikiC yeah, it is
 
Yeah, pretty much
Haven't thought about it that way. Neat. Carry on 😃
 
lol
0
Q: Uncaught ArgumentCountError

FerenjitoMy application has moved to a server that uses PHP 7.1 instead of PHP 5.6. I made use of phps feature not to care about the proper amount of arguments passed to a function. Now, I am getting a lot of Uncaught ArgumentCountError. What can I do about that?

Also the comment...
 
4:17 PM
lol yeah
that guy has 16k rep? I always forget how 10k users can still give the crappiest of advices
 
yeah ... you need to try/catch around the call site ... obviously ...
 
@Trowski Watch pen.island be owned by a porn company
 
-1
Q: PHP7 compatibility

Jiri K.Im looking for fix for PHP7 compatibility. I have code which working well with PHP 5.6.2. Can you please help me to work with PHP7? <?php $select = "SELECT post_title , ID FROM wp_posts ORDER BY ID DESC LIMIT 60"; $sql1= mysql_query($select); $a = 1; while($row = mysql_fetch_array($sql1)){ ?>...

wow
there's so much php7 nonsense
0
A: different result between php -v and phpinfo()

davidkonrad PHP -v returns the SAPI name, same as php_sapi_name() phpinfo() is the same as php --rz, "Show the configuration information for the given extension" http://php.net/manual/en/features.commandline.options.php My conclusion is, that you have a brand new PHP installation (built oct 2015), and t...

 
Anonymous
!!wotd
 
Throttlebottom: a harmless incompetent in public office.
 
4:50 PM
\o
 
@Jeeves so relevant
 
@littlepootis It's only relevant to you because you are a programmed robot.
 
@LeviMorrison @bwoebi So what is the status of wiki.php.net/rfc/arrow_functions ?
 
@Sara Try and find the best syntax for making it through internals.
fn(params) => expr had better reception than |params| expr |params| => expr.
Some people pointed out function(params) => expr doesn't have to reserve a new keyword but honestly I don't like that option as supporting blocks means we'd have to do something like function(params) => {} which just seems weird.
 
@LeviMorrison remember that it would actually be || =>
 
5:02 PM
Oh right.
Phew, barely made it in the edit window ^_^
Oh man, the people who put curlies on newlines:
$f = function() =>
{
    // ...
};
Do they do that with lambdas too?
 
$f
=
function
(
)
{
//...
}
;
Hey, they said I should avoid deeply indented code!!!
 
@NikiC Needs more whitespace. Add at least 3 empty lines between each line.
 
Man PHP dates confuse the hell out of me
If I want to get the current date in date type not string type I have to do strtotime(date("Y-m-d H:i:s"))?
 
5:18 PM
evenin r11
 
@Alesana new DateTime(); ?
 
Anonymous
@NikiC I like it :)
 
@iroegbu Ah now I realize I misunderstood, I thought that there was a date object, a datetime object, and strings that could all represent dates. I just now realized that instead of being a date object it's actually a string integer(?) containing the amount of seconds since Unix Epoch
I don't know how long it's been that I've been dealing with dates that I didn't understand that
 
(params) => {} and (params) => expr; both look nice
as well as () => expr; and () => {};
 
It looks like Symantec is fucked
 
5:34 PM
dam
 
Wes
5:55 PM
> 1 day remaining
thanks, dropbox ... for just a 100mb file -__-
 
does anyone have any experience with mysql, im tryna get a php file to create my database
 
@LeviMorrison I'm not sure what the objection is to a new keyword. The contextual fallback introduced in 7.0 (or was it 5.6) makes that pretty much a non-issue now, doesn't it?
Hrmm, no, we might need to exclude that from fallback since fn($x, $y, $z) could quite easily be a function call
Nevermind
 
bob
hey peeps, i'm making an advanced search, with php, ajax and mysql. just one small question how do i make the input values effect the other input values in the mysql select statement. for example if you have some search for "hotel" and they select the city "London" from a drop down, what would my sql query look like? thanks for any help :P
 
At which point: [ fn(x) => isset($arr[$x]) ] would become ambiguous syntax
 
display * from hotels where city = ?
then assign ? as a string = city
or something
 
Anonymous
5:59 PM
@Sara the first and last []
 
Anonymous
Is it an array, or some form of added hipstery there?
 
bob
@RachelDockter yeah ok, and if you have 4 inputs such as keyword, category, subcategory and city?
 
@bob you might want to look at elasticsearch and solr. they might give you some ideas.
 
That's the problem. Currently that'd be valid syntax for an array where the key is the result of a function call to fn(), and the value is a boolean. With short lambdas using fn(...args) => ...expr that could be an array with a key of 0 and a value of a callable
 
@bob 1 sec
 
6:01 PM
Which is what makes the proposed syntax unusable if T_FN is not a contextual reserved wor
 
bob
@RaduStefanPopescu Thanks, but gotta build my own lol
 
@bob google query builder, or seriously use a noSQL search server, they are BUILT for stuff that you're asking for right now
 
@Sara the fallback is just for method names and class constants
but that already covers the very most cases anyway
 
damn, it looks like php lacks query builder. have fun using string concatenation and such :)
 
Not global function names?
 
6:04 PM
@Sara no
 
Oh... well... alright then
 
bob
@RaduStefanPopescu ok, will do.
 
How does this language even work?
 
@Sara how do you mean?
 
Facetiously. As in "I can't even PHP"
 
6:07 PM
@Sara it's just details nobody cares of and they do just work
 
PHP is a serious condition that a lot of people have to deal with every day, definitely not something to be taken lightly
 
Unicorn farts and Pixie dust. Gotcha
 
:-)
 
@Sara Correct. It must be a keyword.
 
Obviously it has to be a keyword, I was more working through if it could be a context-sensitive one. Answer to that seems to be "yes".
 
bob
6:20 PM
@RachelDockter ok
 
If I want to update every row in a table, is it good practice to run UPDATE table SET column=:value WHERE 1=1?
 
just remove the WHERE clause altogether
 
Ah that makes more sense
I felt like I was doing something redundant
 
evenin
it looks like we have had another attack of clueless java troll
 
6:37 PM
eh?
 
33 mins ago, by Radu Stefan Popescu
damn, it looks like php lacks query builder. have fun using string concatenation and such :)
 
oh lol
 
he's either troll, ignorant or from 2000
 
or an ignorant troll from 2000
 
6:57 PM
That sounds pretty accurate ^^
For some reason my SELECT query is returning TRUE, and if I try to do run $qry->rowCount() or $qry->fetchAll() on it, it tells me Call to a member function rowCount() on boolean
 

« first day (2350 days earlier)      last day (2591 days later) »