« first day (1844 days earlier)      last day (3098 days later) » 

Abe
12:02 AM
but sure union types would be another use case
which is also extensively used by core functions
 
It's also useful for autogenerated code.
fuck it. why am I bothering.
 
Abe
[insert bro hug meme]
 
Abe
1:02 AM
@Andrea anyway, don't take our complaints personal. we don't want you to leave php again :D
i am more disappointed that people is voting it blindly, i believe (not all of them sure)
 
Abe
@AnmolRaghuvanshiVersion1.0 morning!
 
1:26 AM
hey
i need help with auth in php (laravel)
I was thinking of doing this(everything from scratch): Login, with the right creds, and you will get back a huge ,random string, (which is hashed). Save that newly created string in my database of authenticated users, and have a foreign key of the user_id in the same table.

return it to the client , which should Save it in a cookie.

For subsequent requests, laravel can check for existence of a cookie, and run a query in the token database. If a valid token exists, get the USER ID associated with the token.
 
Abe
1:42 AM
@harvey_slash search "remember me cookie" on stackoverflow
 
how do I do it for REST ?
its a REST api , i forgot to mention
 
@Abe no I'm not upset
 
Abe
okay!
@harvey_slash doesn't really matter afaik. though i'm still unrestful so i don't really know
 
the biggest problem with this is
for every page that needs to be loaded
or any request
I am checking for validation
how do I make that more efficient
?
 
Abe
you check if the session cookie is valid
 
1:49 AM
@harvey_slash why are you doing everything from scratch
 
tell me what I can use
I am using laravel 5.1
 
2:18 AM
How can I convert date_resigned to Year only? syear field is int(4)
"INSERT INTO
tb_finalpay_detail
    (fpayID, cooploanID, syear)
SELECT
    p.fpayID, m.cooploanID, p.date_resigned
FROM
    tb_cooploan_master as m
INNER JOIN
    tb_finalpay as p
ON
    m.coopmemID = p.coopmemID
WHERE
    clmstID!='NULL' AND p.coopmemID='$coopmemID'";
It saves to the database like this. 2147483647
I want year only like 2015
thanks in adnvance
 
Abe
(new DateTime('2147483647'))->format('Y') @Micaela this?
@Micaela deary me. this works 3v4l.org/l0XKI
 
2:38 AM
im getting the value of date_resigned from tb_finalpay. for ex. his or her date_resigned = 2015-09-12 . I want it to pass to syear but it shows like 2147483647, etc. I just want it to output like (2014) etc.
@Abe
syear is int(4) not date
"INSERT INTO
tb_finalpay_detail
(fpayID, cooploanID, syear)
SELECT
p.fpayID, m.cooploanID, p.date_resigned='".date("Y")."'
FROM
tb_cooploan_master as m
INNER JOIN
tb_finalpay as p
ON
m.coopmemID = p.coopmemID
WHERE
clmstID!='NULL' AND p.coopmemID='$coopmemID'";
won't work also
 
Abe
yeah. got it. i'm an idiot
p.fpayID, m.cooploanID, YEAR(p.date_resigned)
 
thanks hahaha
 
oh.. thank you
 
Abe
don't thank me prematurely. did it work? xD
 
2:43 AM
yes :D i'm noob haha
 
Abe
everyone is a noob. there is no absolute knowledge, only different levels of noobness
:D
 
:)
Very good thought Abe
 
how can you maintain a database connection through an anchor tag?... ie.. user reaches index.php which redirects them to the proper login.php view. User clicks "Register Now" link which directs them to register.php view. This view is just a view and has now lost connection to the database.
 
3:06 AM
@captainrad Find a protocol other than HTTP.
You're probably meaning to ask, how can you persist information between different page requests, though. For that, you want sessions.
 
 
1 hour later…
4:18 AM
@ircmaxell The PR for 'class constant visibility' is done on my end AFAIK, added some more tests and fixed all the comments. You mentioned that you have some other stuff that I could be helpful on?
I would just like to work on something that everyone wants, or was started but never finished.... or bugs but 7.0 looks pretty much covered
but checking again for fun
 
good morning
 
Abe
mornings
 
4:34 AM
good morning
 
Very good morning:)
 
moin
 
4:55 AM
so morning ...
-2
Q: What happened to PHP 6?

kotapeterCan someone explain to me, why is 7 the next PHP version? What happened to PHP 6? Thanks!

 
Abe
> representing text strings as UTF-16 internally
wtf?
why would anyone use utf-16?
 
same as Java @Abe
 
Abe
that's.... dumb
 
I'm not sure of the reasons, I used to know, but can't remember ...
 
Abe
could be because icu uses utf-16 internally
actually i'm not even sure of above statement
 
5:09 AM
that's what it's optimized for, you kinda choose what to use, but internals of icu expect UTF-16 ... but there's a reason for that ...
 
morning
 
Abe
because Jabba is my guess :B @JoeWatkins utf-16 is dumb compared to utf-8 and utf-32
 
'nin
 
Abe
@NullPoiиteя o/
 
5:15 AM
@Abe I know why, it's because a range of utf8 chars are three bytes wide
 
Abe
hum?
 
well that means that all the characters that are not three bytes wide still need three bytes allocated in a lot of cases
 
Abe
well, utf-16 requires up to 4 bytes
2 or 4 bytes, while utf-8 is 1 2 3 or 4
also utf-8 is better sorted, means that characters that are more likely to be used will also use fewer bytes
 
oh yeah ...
then, I don't know ...
 
Abe
utf-32 instead is always 4 bytes each char
 
5:21 AM
these are decisions we could never make, and will likely not make for PHP ...
there isn't even talk of unicode anymore ... it's not mentioned in 7.1 ideas on wiki ...
I'm not mentioning it ... that would be dumb ...
I think ustring is probably enough ...
 
Abe
there isn't an actual need for native unicode strings @JoeWatkins but rather a nicer api
oop api
 
agree ... github.com/krakjoe/ustring ... am too busy to finish, or push for inclusion ...
 
Abe
yeah been following that :D i'm already using intlchar :P
also exposing more from icu would help reducing the need for other extensions
like mbstring iconv etc
 
it's so messy
 
Abe
5:28 AM
:(
 
Abe
by the way, i was planning doing some tests. my guess is that php is using different unicode versions at the same time :D
icu is the only ext telling exactly what unicode version is supported. others don't
my guess is that pcre, mbstring etc, could behave inconsistently each other. will do that once i get the time
 
I think there was an rfc addressing some inconsistencies there a while ago ...
 
Abe
hm, can't find it on wiki
public function pad(int $length, UString $pad = ' ', int $mode = STR_PAD_RIGHT): UString;
would remove this, unless it takes count of combining characters :P
 
5:51 AM
wtf http://stackoverflow.com/questions/33492167/php-database-inventory-u‌​pdate-method-error
 
 
1 hour later…
7:15 AM
Morn
 
@Orangepill o/
@Epodax morning
 
7:40 AM
$flu_vccne     = $_POST['flu_vaccine'];
$flu_vccne     = $flu_vccne  ? $flu_vccne : 0;
What does this means guys?
 
which part?
the second line is a ternary operator
 
$flu_vccne ? $flu_vccne : 0; here
 
Google php ternary operator
 
thanks
 
or just php ternary
 
7:47 AM
lol stackoverflow.com/q/33493721/1723893 this is lots of echo
 
Hi all
Please can anyone provide links to where I can learn more about PHP and its usage?
 
Sep 29 '12 at 13:58, by Gordon
@hekko if you want to become an expert programmer, google SOLID, buy GOF, buy POEAA, buy Clean Code, learn Refactoring, lookup GRASP, DDD, CQRS, DCI … but dont ask for PHP books. That's the most reasonable suggestion I can give you when you ask for Expert PHP books really.
worthy advice by Gordon
 
Thanks @NullPoiиteя
Please do you have a site where I can get these books online?
The reason why I am asking is because I've never heard of them, and I don't think they are in my local bookstore.
 
@SamuelAsor No matter your intentions, I don't think you'll have much luck asking for good places to learn php here I'm afraid.
 
Wow! If I may ask, why do you say so?
 
8:01 AM
Because it's a often repeated question and it usually all boils down to each individual person and how they best learn, so what might be best for me, might not be best for you, further more, people might not have the time / want to take the time to show / find these places for you, even if you can't find them yourself. (Please do note that I don't mean anything disrespectful with this).
 
amazon is a thing ....
buying second hand books is smart too ...
 
Oh, I now understand @Epodax. Thanks for the explanation.
I think I'll try amazon @JoeWatkins.
On the second thought, where can I get these second hand books?
 
Amazon / Ebay
Speaking of Amazon, It wasn't until recently that I realized just how awesome Amazon is :D
 
Oh, really.?
 
They have shitton loads of stuff to (usually) fair prices, and although this was just my experience, their customer service is amazing. I broke my kindle (stepped on it during a night), I hadn't bought the kindle from them but a retailer, I contacted them regards repairs / what would be the cheapest replacement option for me, they sent me a brand new kindle for free ^^
 
8:07 AM
is there a good read on private API principles: whether to use complex API calls or use it as a storage only (which side to keep logic on) in context of microservices?
 
local book stores have been a terrible source of reference material for years now, they'll have a tiny section of "computer" books ... "how to build an iOS App and Be a Hipster" and the like ...
 
Second that, and more often than not, the material they do have is outdated as a mummy.
 
I once got in an argument with someone who worked in a bookstore because astrology had a bigger selection of books than IT, worse, the astrology books were bunched in with the sciences ...
 
@salathe I've funked up phpstorm 10 license.
pwned it
 
yo @DejanMarjanovic, hows it going ?
 
8:15 AM
Yo @JoeWatkins, missed you :* :D
 
hehe
 
Hi Guys , anybody here uses laravel?
 
morning!
 
good mornings!
 
8:31 AM
sweeeeeeet
 
Abe
@JoeWatkins nice impreza #howtoannoypeople
 
i was wondering on the laravel folder which doesn't have an index.php
which doesn't show up your data on the localhost
anybody has any ideas?
 
nobody uses laravel here
 
Abe
no artisans here
 
only mere mortals
 
8:35 AM
hahha
i thought so
thanks guys
what are you using then/
 
@boyee we use php
 
all pure? how come no php framework?
 
@Abe :D
 
anybody uses socket io?
any thoughts on using php chat without using setinterval on any ajax?
using setinterval on ajax for a long time crashes ur browser , i was just hoping to have a ping style and the server listens if there are new data then the functions runs again
 
8:40 AM
@boyee socketo.me
 
are using this"?
i'll try on it
 
@JoeWatkins that your ride?
 
@boyee are you a filipino?
 
8:54 AM
Morning
 
@Duikboot mogguh!
 
o/ !!!
@boyee What was that about your first Q.
 
@boyee There's @kelunik's Chat
 
posted on November 03, 2015 by nlecointre

/* by somename */

 
@Fabor, that requires PHP version 7
 
9:03 AM
Which releases soon tbf
 
I ponder what it uses that makes it 7-only
 
Still wondering here too.
 
9:19 AM
@NeoThermic It'll be composer setting only
:D
 
@DejanMarjanovic You've what?
 
@JoeWatkins Oh man I just want to mount it right now
@DejanMarjanovic @Webfarto \o
 
Webfarto
 
hi every body
 
9:22 AM
\o/ @Jimbo
 
hi one body. lol
 
mogguh
 
i am searching a ide for php that be as visual studio for asp .what is popular ide for php?
 
PHPStorm
 
@zohreh you can make visual studio work with PHP if you like it so much :)
@DejanMarjanovic You broked it!
 
9:30 AM
in Asp when we change entries of a procedure it detected by visual studio and it display error on code calling procedure but in phpstom dont occure @salathe
I need Ide detect change of in procedueres and methods and display error to me
 
@zohreh and once again, in English please?
 
You say?
 
i cant speak english good :(
@salathe
 
@zohreh That's fine, I was being facetious.
I don't know what changing entries of a procedure means, so I don't know how to help.
 
Proucedures of sql
 
9:37 AM
By any chance, has anyone ever come across doctrine hanging when doing a schema-tool:create or schema-tool:update in vagrant? I call those now and they just sit there not doing anything, no errors
 
hello all,

i want to learn web socket, is their any good reference to get knowledge step by step of web socket.
pleas help me.
@zohreh i think netbeans is the good one.
 
hey, short question, not directly php related: select * from table where nr = 1234, 5678. syntax error at , . how can i state multiple conditions?
 
@TechTreeDev use AND
WHERE nr = 1 AND nr = 2
 
aww, damn :D wrote where nr= 1 and 2 :D
 
9:48 AM
Que?
 
@Naruto yes
@Jimbo inorite :D
@Abe it's the only impreza left with a standard exhaust, it's really quiet ...
 
@JoeWatkins nice ride anyway :)
 
Abe
lol
 
you like crazy cars @Abe ?
 
Abe
i do
well, not fast&furious crazy :D
 
9:57 AM
that used to be mine ...
I super hated it, I liked looking at it ... but everything else was a nightmare ...
 
Abe
hahaha
 
Abe
took me a while to realize it's an impreza :D
 
probably better from side ...
 
Abe
:P hahaha it's horren...ific :D
 
10:00 AM
it was as fragile as it looks ... it blew up ...
 
Abe
lol, was it stock apart from the look?
 
nooooo
 
Abe
i wish i could get such low tires on my car... roads are shit here
 
 
dccd from a special edition, short shift, huuuuuuge turbo, fancy ecu, turbo timers and electronics, sti everything on top of engine, the exhaust was like a drainpipe all the way through, I couldn't start it after dark because did actually complain ...
 
Abe
10:03 AM
@Jimbo yours?
 
600hp, representing :-P
 
@Abe Yep :) and...
 
dribbles ...
 
Although I think @JoeWatkins has 10 more bhp than my RR :'(
 
Abe
no. honda. no. NO
@Jimbo when i bought my car was undecided between the 350z and the rx8
350z could be much better if it had a smaller mole
feels so heavy on the road
 
10:05 AM
you could probably get another ten if you fiddled ... isn't the triumph heavier anyway ?
 
@DejanMarjanovic 600 bhp?!
 
2 cars x 300bhp
 
Ahh :D
 
Abe
though jimbo i owned 2 z :D 180sx and 200sx
 
Nice, the classics
 
Abe
10:07 AM
currently this
 
Morning!
 
I'm much less into powerful cars ... just to take my misses to work and back, which takes about 20 minutes, costs me nearly ten quid a day ... I can't do it for two days on ten quid ...
 
Abe
planning buying a mx5, or a brz
 
this is just stupid, it has to go ...
 
@Abe LOVE the Brz, so so so sad it's only 200bhp
 
10:07 AM
I have 2 feet @ 2hp.
 
Abe
as long it drives fun, 200hp are fine @Jimbo :D
 
each leg has the power of a horse @Fab ?
 
Yup.
 
I was behind one in the other day in my Z, it has such a nice rear end, but I just thought, mines half as much and a lot faster... @Abe I was looking at superchargers for them, would love to have a 400bhp brz / gt86
 
Abe
i don't think it's a good idea getting superchargers on a naturally aspirated engine :B
 
10:10 AM
@Fabor :o they're some legs ...
 
Abe
@Jimbo just tell me you bought the honda when rossi was a honda rider
 
@JoeWatkins I drive on LPG which is 20p/L so it's affordable
 
@Abe It's a boxer engine right? Apparently these are so much nicer to tune
 
Boxer @Jimbo
 
10:10 AM
@Abe I bought it about 8 months ago
 
Boxter is a Porsche :-P
 
@DejanMarjanovic Yeah, has a porche engine ;)
 
Abe
boxer engines are known to break in pieces easily :D
 
Everyone always rabbits on about the Porche 911, I just really don't like the look of it, too old
I see them everywhere
 
Abe
boxer is a kind of engine design. it's a V of 180°, so it's basically flat
boxter is a kind of porsche, which uses a boxer engine :B
 
10:12 AM
as I've already mentioned :-P
 
Abe
:D
 
I wouldn't cry if you gave me a 911 ... but same, they really are everywhere ...
 
Abe
and no @Jimbo brz's engine is subaru :D
 
Should your view / template be as abstract as possible? For example, would it be more favorable to pass a user name as a string as opposed to passing something like the active record & using $user->name.
 
Abe
@Jimbo you should have bought a ducati :D
 
10:14 AM
@Sean I like to explicitly state what data I'm providing the view, not just a load of random objects I can pull stuff out of. Different ways... (Other people might have different opinions, I'd love to hear them)
@Abe Either 899 or new 2016 959 is what I'm after next
I test rode the 899, nearly smashed my balls off
(accidental wheelie at 50 in first)
 
Abe
haha
 
I love looking at ducatis ...
some of them are apparently extremely expensive to maintain
 
Abe
if i had the money and lot of it, i would buy a harley vrod. it's the only bike i could ever buy
now it's called "street" afaik
 
@JoeWatkins Hell yeah, that's why people buy them to look at in the garage and barely ever ride them lol. I'd definitely factor in the full extend warranty if buying one of those
 
Abe
but it's 20k€ or something
 
10:19 AM
I just couldn't cope with that, they are too much money not to be really usable ...
so pretty though ...
I think older ones are prettier too ... which makes them even worse to own ...
 
Abe
yeah
 
Wouldn't buy one on finance
Definitely own it outright, then if dropped, I don't have to worry
 
I got a kind of insurance that covers me for the next three years, then I'm on my own ...
 
any one have good knowledge of web socket in php. i want to learn
 
they pay the difference between what I paid and what the insurer pays out ... 30 quid a month for a year to be covered for three years seems sensible ...
 
10:22 AM
@SatanandTiwari ratchet php, google it, they have tutorials on there
 
Abe
@JoeWatkins what other cars did you own? :D
 
@Jimbo i want to learn from beginning but that is not understandable.
 
@Abe the only ones that were any good were imprezas ... I'm kind of addicted to them, I think ...
they're too painful to run now, I'm looking at my options at the moment ... but it won't be fancy ... because bike ...
 
Abe
not only you i believe :P i've seen so many imprezas/legacy in the uk. here instead are incredibly rare
 
newer ones aren't even any more economical, so no point considering one of those even ... I dunno, I might get one of these things that has a lifetime warranty ... they're all shit, obviously ...
 
10:27 AM
@JoeWatkins lifetime warranty?
@SatanandTiwari That is literally as simple as you can get. If you can't understand that yet, you won't stand a chance with websockets
 
yeah 7 years or 100,000 miles, kia do it, I think some others do too ...
 
Abe
@Jimbo do they exist?
 
Joe says they do, sounds alright
 
lifetime of car (100k)
 
Abe
koreans are doing fine too
i heard ssangyong (i've actually read it, because nobody can pronounce ssangyong) cars are cool, considering their price
 
10:30 AM
I've seen a few of those recently
 
Abe
i liked daihatsu as well. they are japanese with toyota engines
 
dacia are another one I keep seeing, they even have a dealership near me ...
sandero stepway, there are three of those near my house, I see them when I walk the dogs ... they look pretty nice, for 8k
 
Abe
yep, i know dacia... but they are still unknown
 
Yeah, but f* it... still not that cheap...
I think it's the same price as Suzuki SX4
 
One of them is 5k
And it's brand new
I think for the warranty you get with that, it's great
Good mpg too, I've only heard good things
 
10:35 AM
OK, I see it's a lot cheaper in UK than EU
 
@Ocramius ping if you have a sec, I need to figure out why doctrine cli is just hanging on create... can post SO question but thought I'd ask you first
 
Ignore - Old sensationalist news. Nothing to see here.
 
Yeah, everyone'll ignore that anyway
 
the bill is written, they are about to start pushing through parliament ...
not yet published, I think it's coming ... going to hear more about it probably ...
 
TBH. Do we think they're just legalizing what they're already doing/trying to do anyway?
 
10:43 AM
basically, at the moment they can plead with tech orgs to co-operate, but they can't do anything else, making law is just twisting their arms ...
I don't think it will go through ...
they cannot remove tech that is out there, the thing is pointless ... but they want to be seen to be doing something about it ...
 
Aye
 
hello
when i do this sum, $remaining2LeafPages = ($textRawSections - $numberOfSwSections) * $size2leaf; my variable is not coming out as an int
but when i do $remaining2LeafPages = (int) $remaining2LeafPages; it makes the int value 1 rather than 2
Does anyone know what I am doing wrong
 
Are all of those variables on the right-hand side, integers?
 
might be a .333
one of them
 
what's the best way to create / generate an excel? I used to use phpExcel, but that takes to many memory,which I don't have..
 
10:52 AM
@Naruto - Which of the PHPExcel built-in methods for reducing memory usage have you tried?
Have you tried cell caching at all?
 
they have something like that? xD Ok, didn't know that, let me get into that
 
If so, which methods?
Reading the PHPExcel documentation always helps
 
I guess it does, when you know where to look :)
 
@Ocramius Anti-ping, I've solved it, passing the wrong path (one level up) to the annotation driver completely fucked everything up
 
@DejanMarjanovic Good to see you're still alive
 
11:05 AM
Pretty sure @DejanMarjanovic is unkillable.
 
R.P
11:17 AM
Does anyone know if mod_status shows accurate (page with images identified as one request) data of visits per second? Or does it count image loadings etc. as page visits?
 
@Fabor That's probably true :P
 
11:38 AM
Aaaaaand itunes is down again...
Damn you would think apple has enough moneyz to add some freaking extra servers for their developers :(
 
itunes... -_-
 
morning
 
morning @kelunik
 
@kelunik yo
 
\o
 
12:16 PM
:)
 
@MarkBaker Is this pastebin.com/JipZYXmS the correct way of applying? Since I keep getting memory exhausts, and not sure what I'm failing on?
 
12:40 PM
It's the correct method, though you should be trapping for Boolean false return.... and what version of PHP are you running? SQLite is for older versions of PHP, SQLite3 for the more recent versions.... you could be getting a false return if you're enabling the wrong one, and it will then revert to memory again, because you've no error handling there
 
@MarkBaker it's returning true, I pplied error handling, just made it as easy as possible in the paste, PHP version is 5.3.10 and it's returning true voor SQLite3
 
So is it still memory erroring with SQLite3 as the cache?
 
yes
 
Then we need to figure out where all the memory is actually going? Are you building any large arrays in your script?
 
12:47 PM
Where does the data that you're writing to PHPExcel come from?
 
sec, I'll create pastebin with the full script
@MarkBaker pastebin.com/qRpPR3cc, data comes from the DB, so basically that's a large array on itself.. But that shouldn't be that big of a problem..
 
Don't kid yourself..... you could probably halve the memory usage if you can drop that array
Where is $verbruiks actually populated? If, rather than populating the array as you read each row, you can write to the PHPExcel worksheet as you read each row, you can save a lot of memory
 
I realise the array is big, but doing 30k-100k queries for this gets me to many sql connections.. that's why I went with this way of working, any advice on how I should go at this problem?
$verbruiks is populated on rule nr 29
 
@AlmaDo the classic
 
Nobody said you needed to do 30k-100k queries; you shouldn't need to do any more queries than you do now
Are you using any styling? Or any of the "special" features of Excel? If not, then why not just create a CSV instead?
 

« first day (1844 days earlier)      last day (3098 days later) »