« first day (1815 days earlier)      last day (3119 days later) » 

12:06 AM
Is this related to the incompatible base stuff that was reverted?
 
12:51 AM
It doesn't look that related.
Looks like you prevent closures from being rebound to other scopes entirely?
Function from class Foo cannot be rebound to Bar which has no common parent?
 
hi All
I have a string $s = "aaa". I want to replace all "aa" by "a a".

I have tried using str_replace("aa", "a a", $s), but it yields "a aa". It does not put space between the final a,s.
I am very new to Php, so don't know any other stuffs
 
@SonuKMishra you probably want to use php.net/manual/en/function.preg-replace.php
I believe str_replace would be matching the whole length of the "aa" at once. So it would split the string "aaa" into "aa" and "a" before doing the replace, which is why it doesn't do what you want.
The preg_replace should be able to it per character.
 
preg_replace does the same
preg_replace('/aa/', 'a a', 'aaa');
 
1:12 AM
@SonuKMishra use a lookahead, like preg_replace('/a(?=a)/', 'a ', 'aaa')
 
Does anyone know of a repo with a decent framework that I can just unzip that has up-to-date facebook, twitter, google+ and email login ? (Of course I use my app creds for each)
 
@SonuKMishra btw this is a nice few slides on regexes - slides.seld.be/…
 
you have to doubleclick to move forward? wtf
 
or press right?
or down or space.
 
anything but an obvious navigation component. got it.
 
2:04 AM
How can I get the last friday of the month
 
@jemz strtotime('last friday of this month')
 
it returns this 1446159600
how to return something like this YYYY-mm-dd
 
@PaulCrovella if I didn't know better, that answer sounds like BS.
 
I know, right?
 
2:09 AM
$date = strtotime('last friday of this month');

  $d = new DateTime($date);

  echo  $d->format('Y-m-d');
it gives me error
ok got it now
 
2:29 AM
If my query is
$DataBaseHandle = new PDO($Host,$Username,$Password,$Table);
$DataBaseHandle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo 'Connected!<br/>';

$SQLQuery = "SELECT
AVG(payper) + '%'
FROM rep_commission";
How would my query as row be ?
foreach ($DataBaseHandle->query($SQLQuery) as $row)
{
echo $row["????"] ." - ". $row["?????"] ."<br/>";
}

$DataBaseHandle = null;
}
catch(PDOException $e)
{
echo $e->getMessage();
die();
}
Oops wrong query -- "SELECT CONCAT('$',TRUNCATE(AVG(payper),2)) AS Average Pay FROM rep_commission WHERE NOT Commisisionable = 'NO'";
 
 
3 hours later…
5:21 AM
Morning's room 11
 
@samayo I have no idea how you imagine it working
also, monings
 
All the best for interview
 
well ... the interview is in 4 hours
 
(y) share the interview experience after it's over
 
5:41 AM
SELECT CONCAT('$',TRUNCATE(AVG(payper),2)) AS Average Pay FROM rep_commission WHERE type='MISC'
That gives me the ONE type in MISC
but what if I wanted multple types? wont query if i do 'MISC', 'ITEM'
etc
only when I do the singluar
 
wat
 
I want to do multiple WHERE type=""
instead of just MISC, if I try adding more into that it wont query
WHERE type ='MISC','ITEM','ITEM'
breaks
type = (item,item,item)*
 
... WHERE type IN ('misc', 'item')
 
Operand should contain 1 column(s)
@tereško
SELECT CONCAT('$',TRUNCATE(AVG(payper),2)) AS Average Pay FROM rep_commission WHERE type=('TV', 'NET', 'FONE')
 
mornings
 
5:53 AM
mornin @RonniSkansing
I try this, and the same thing ???
SELECT CONCAT('$',TRUNCATE(AVG(`payper`),2)) AS `Average Pay`
FROM `rep_commission`
WHERE type IN (SELECT type =
'TV',
'NET',
'FONE'
)
Operand should contain 1 column(s)
 
6:18 AM
moin
@PaulCrovella ping
1
Q: What are the main advantages of PHP7's strong typing?

igorsantos07Since PHP7 we can now use scalar typehint and ask for strict types on a per-file basis. Are there any performance benefits from using these features? If yes, how? Around the interwebs I've only found conceptual benefits, such as: more precise errors avoiding issues with unwanted type coercion ...

 
@JoeWatkins pong
 
that is not too broad, it asks a specific question, there is a specific answer
> Are there any performance benefits from using these features? If yes, how?
 
> What are the main advantages of PHP7's strong typing?
 
yeah but just a title, the question in the content definitely has an answer ...
I think it worth dispelling myth where possible ... missed opportunity it seems like ...
 
if you want to edit it to just the question in the body, I'll be happy to vote to reopen
 
6:24 AM
> Are scalar and strict types in PHP7 a performance enancing feature?
hows that ?
 
works for me, though I think I liked the one you had there before even better
or i was hallucinating.. either way
 
I just added strict for completeness ...
right now they don't enhance performance at all ... but strict types actually do provide a path to enhancing performance, I figure that's worth mentioning, but make clear that today they make no positive impact ...
thanks for ponging so early anyway @PaulCrovella :)
 
No problem. I actually had a similar thought about that question when I saw it, but I gave up on trying to salvage questions a long time ago.
 
I've added php-7 to the list of tags I search in the morning, there's quite a lot of questions regarding php7 already, or a lot for unreleased software anyway ... I figure it's a place to counter the nonsense from phpclasses and the like, where a lot of people do get their "facts" ...
 
6:34 AM
I didn't even notice there was a 7 tag already. Will keep an eye out too.
looks like a lot of it is "how do I install blarg"... to be expected for a while I suppose
 
yeah building questions too ... it's remarkable that normal users are interested at all though, when php5 came, we had to beg people to use it ...
 
had to beg shared web hosts to install it, individual developers were all over trying it
 
I dunno if they were out there asking questions though
I remember there being an attitude that it didn't really matter what happened until shared hosts had it installed ... and hardly any did ... there's a change there I think, some of the big names are running alphas already might be the reason, but I think it's going to be taken up quicker than 5 was ...
 
yeah, that attitude came largly out of the already-existing open source projects who had buckets of horrible legacy code that needed rewritten anyway
waiting for shared hosts to upgrade was at least in part a convenient excuse
I expect quicker adoption if for no other reason than the code is better now than it was then, and it'll be easier to adjust.
 
also, release schedule, in ~11 months, php5 will no longer be developed, just sec fixes for a year, and then its really really dead and you'd have to be mental to use it ...
 
6:46 AM
plus the rise of cheap vm hosting has given people a lot more power to determine the environments they deploy to
 
and that ...
 
still gonna have a long tail of 5.3 and such kicking around, but it won't be the nightmare it was coming up from 4
 
@JoeWatkins When creating an internal interface or trait with abstract methods, should I be declaring PHP_METHOD's for them as well as the PHP_ME entries?
Wait give me a second I could just try it and see what happens.
 
you were only just quick enough to retract that question :)
 
Is get image base64 string from PHP is a good practice? or decode them before get the base64 string?
 
6:53 AM
Undeclared identifier when using PHP_ME but not when using PHP_ABSTRACT_ME.
Now all I have to do is figure out how to specify a protected abstract method as PHP_ABSTRACT_ME doesn't take any flags.
 
none of that was a question, right ? you still want to figure it out ?
 
It's not a question yet.
@cwfei Could you give us an example of how you are using it? Decode the base64, then use that string to create the image. (I think)
@JoeWatkins I came with the intention to ask. I could use ZEND_FENTRY directly.
I'm going to do that, unless there's a good reason not to?
 
you can use it directly ...
0
Q: php 7 unable to initialize sqlsrv

pbolducI searched all day to find out a solution for sqlsrv dll on php 7 VC14 x64 Thread Safe and i did not found a solution. Does anyone solved this issue : [04-Oct-2015 19:48:05 UTC] PHP Warning: PHP Startup: pdo_sqlsrv: Unable to initialize module Module compiled with module API=20131226 PHP co...

 
> The extension you are trying to load was built for PHP5.6, it will not load under PHP7.
I see that getting repeated a lot in the days to come
 
yeah probably, the message is so cryptic ...
 
7:03 AM
@rtheunissen I get base64 string image and parse it to JSON, then convert it to image in android, but I store the base64 string as array, it store multiples image it will very lag
0
Q: How to get BLOB image file from MYSQL server via JSON efficiently

cw feiMy MYSQL db contains 5 rows id, name, username, password, email, image The image type is BLOB. I'm currently using the PHP codes below to get JSON data from MYSQL. while($row = mysqli_fetch_array($res)){ array_push($result, array('id'=>$row[0], 'name'=>$row[1...

 
@rtheunissen maybe your first PR to php-src could be a fix for that ... either change ZEND_ABSTRACT_ME (only used by a few core exts) or add ZEND_ABSTRACT_ME_EX
 
I just typed #define PHP_ABSTRACT_ME_EX I kid you not.
 
your are one of us !
 
I'd rather just allow extra flags for ZEND_ABSTRACT_ME. As long as you still |= ZEND_ACC_ABSTRACT I don't see how it could cause any problems.
Internally, that is.
 
macro would change
so you'd have to change ext's using it, and it would break bc with wild ones using it ...
 
7:08 AM
Yup you'd have to update what your passing to ZEND_FENTRY
 
_EX avoids that ...
 
That's a solid point as well. Unless you can render the last parameter to the macro optional. Which is where my lack of C fundamentals hurts.
 
this is so fun to watch... they grow up so fast
 
I suspect that that's just not how macros work so an _EX is the best option.
 
you're correct ...
but how would it work exactly ...
would you have to provide ZEND_ACC_ABSTRACT flags yourself, in which case is it ABSTRACT_ME ?
 
7:12 AM
10 hours ago, by samayo
@tereško You really think that movie deserves the credit it gets?
 
take a little bit of thinking, but you want ACC_ABSTRACT to be implicit
 
absolutely yeah !!!
I want to give it 10 in IMDB
that was really good!
 
(it's doable)
 
Yeah that's what I was implying with |= internally. If not provided, the OR would apply it. If also applied, it wouldn't make a difference.
Would that work?
 
Anonymous
@Sajad 10? really?
 
7:14 AM
there's quite a few of these situations you know, where macros don't cover what you want to do, imagine there's even more to be dug up now because types on functions ... might make a good first PR, don't step on toes or break anything and it's a no brainer imo, we need 'em ...
 
Anonymous
@tereško you are really getting on my nerves now.
 
@samayo yes, that movies changed me!
 
@rtheunissen it'll work, but it'll look different from ABSTRACT_ME ... sure you can figure it out ...
 
@samayo u wot m8
 
Maybe...
#define ZEND_ABSTRACT_ME_EX(classname, name, arg_info, flags) \
ZEND_FENTRY(name, NULL, arg_info, ZEND_ACC_ABSTRACT | flags)
 
Anonymous
7:15 AM
@Sajad I guess it depends on how many movies you have seen
 
I have not seen a movie in its level so far, even I think I will never see
 
Anonymous
In sociology and psychology, mass hysteria (also known as collective hysteria, group hysteria, or collective obsessional behavior) refers to collective delusions of threats to society that spread rapidly through rumors and fear. In medicine, the term is used to describe the spontaneous manifestation of the same or similar hysterical physical symptoms by more than one person. A common manifestation of mass hysteria occurs when a group of people believe they are suffering from a similar disease or ailment, sometimes referred to as mass psychogenic illness or epidemic hysteria. == Characteri...
 
@samayo eemm, actually I have not seen very movies, maybe 15 - 20
 
@rtheunissen tried it ?
 
So if you want a static abstract method, you'd use ZEND_ABSTRACT_ME_EX(..., arginfo, ZEND_ACC_STATIC)
Nope not yet.
 
7:19 AM
gotta take offspring to school ... you're on right path ... looks for others too ... kill many birds with one PR ... fuck the birds, noisy twats ...
 
Drive safe, catch you later.
 
good moring
 
Abe
mornings
 
Morning Abe
 
Anonymous
7:38 AM
@Abe morning
 
Abe
o/ ppl
 
morning
 
@JoshWatzman ping
 
@JoeWatkins that question has reopened, btw
 
7:46 AM
o/
 
I'm proud of myself, I went an' entire friday without clicking a single link ^^
 
@Epodax You mean like, not a single link anywhere?
 
hell, I've become distrustful of my own bookmarks
 
Morning
 
@NikiC From the chat that is!
 
8:00 AM
@Epodax Not paranoid enough!
 
Anonymous
:)
 
@Epodax lies!
 
@JoeWatkins Compiles just fine, which I'm fine with for today. Thanks for your help.
 
@Naruto from this chat
@NikiC Apparently not :P
 
can we get rid of mb_detect_encoding? all it does is confuse the shit out of people
 
8:16 AM
morning
 
If you have a Foreach
then an echo
can you put If else display "0" ?
 
What?
 
or a keyword you choose ? like an error
 
could you demonstrate your question with code?
 
foreach ($DataBaseHandle->query($AveragePayFSP) as $row)
{
echo $row["Average Pay"];
}
 
8:19 AM
Yes, and then where is the if clause?
 
lets say they dont have any data in their respective 'database'
 
then you shouldn't be able to get in the foreach...
 
can I add after } if clause { display words or #'s }
 
@rtheunissen welcome
moin new peepz
 
I am doing a dashboard for sales
 
8:20 AM
@tereško what is the point of this pic ?
 
Then your foreach throws a error
 
and if they're new they're not going to have sales
so if they have no data, i want to specifiy a # value of 0, or words "get sales"
kind of thing
 
you should do the if clause (checking for errors) before the foreach. Or simply throw the foreach inside the if clause.
 
@Sajad there is a trend in western countries. People that are casually described with the word "hipsters". The image is just stating that it will pass, just like the 80s/90s trend passed (which is from the lower pictures)
 
so IF { error }else{ foreach }}
?
error else *
 
8:22 AM
Yea, something like that
You could also just do if(no error){foreach()}else{ error }
 
@tereško aha ..!
however I know the right-bottom photo, several times ago, he answered one of my question on stackoverflow
 
Anonymous
hehe
 
@Sajad do you also believe that @samayo is a real monkey?
 
:-)
 
@tereško A real Fire monkey?
 
Anonymous
8:27 AM
I'm that monkey in the picture. It's real, no tricks.
 
Anonymous
 
@tereško how was your interview? you got that job ?
 
3 hours ago, by tereško
well ... the interview is in 4 hours
 
ah
 
So, 1 hour?
 
8:28 AM
good luck
 
well, it's at 10:00 UTC
 
@samayo The makeup looks photoshopped
 
@tereško you do it in the home using webcam?
 
@tereško hello, which company are you going to?
 
@SergeyTelshevsky no idea. It's some recruitment firm which does the interviewing
 
8:30 AM
"enjoy recruitment"? :)
 
"working day"
 
... :D
 
@Danack Closure::fromCallable() … seriously? well, at that point just make it in the ctor…
 
hate these pointless interviews, went to one last month, the guy didn't understand what I was saying 90% of the time
 
8:31 AM
@tereško do YOU have the advantage? do YOU know Laravel!?
 
Who works here in Google team?
 
I can fake it
besides, I already suspect that I won't be taking that job, because company uses ZF2
 
you sure you can swallow your pride and write shitty code? :)
 
I really dont want to work with zend framework
 
8:33 AM
@Micaela Are you asking if any of us works for google?
 
I don't like it too
 
shitty artisanal code
 
yup
 
@Micaela afaik, no one atm. @ircmaxell used to work for google though
 
anyway, now I need to find a clean t-shirt
 
8:34 AM
@tereško nah, just be yourself ;)
 
emm ... I am sitting in a fucking towel
 
if (
foreach ($DataBaseHandle->query($AveragePayFSP) as $row
{

}
echo $row["SALESIDENTIFIERKEYHERE"] == null){
true
}
else{
false
}
var else = this.text = "Get SALES!";
what am I doing wrong
 
@tereško To some that might be a plus.
 
it will be hard to use a bicycle like that
 
lol, thats kinda what I am after.
 
8:35 AM
just hitch it up a bit
 
posted on October 05, 2015 by nlecointre

/* by Frankie */

 
... and my brother has stolen my black turtleneck sweater :(
 
@tereško Here are some interview tips.
 
rofl
 
8:40 AM
heh. I think my favorite is the delegation one :P
 
@FlorianMargaine yeah, that was a really good one
it's a really good answer for a stupid question
 
@tereško in my opinion you should wear a formal clothes, like a "suit". t-shirt is not proper for a interview.
 
@Sajad Most developers don't wear suits
 
@Sajad E_TOO_FORMAL.
 
@Sajad it might be a cultural thing, but here only developers who wear suits work in banks .. and even then they find workarounds
 
8:46 AM
@Epodax something like this ?
$BlowoutAllProductPay = "SELECT product, CONCAT('$',TRUNCATE(AVG(`payper`),2)) AS `PAY` FROM `rep_commission` GROUP BY `description` DESC";

// Boolean to string function
function booleanToString($bool){
if (is_bool($bool) === true) {
if($bool == true){
return {

} else {
return "You have no sales in the system, Go get your first sale!";
}
} else {
return NULL;
}
}

// Setup some boolean variables
$Var_Bool_01 = true;
$Var_Bool_02 = false;

// Echo the results using the function
echo
{ foreach ($DataBaseHandle->query($AveragePayFSP) as $row)
 
someone interviewing for a developer position in a suit usually signals: "this is my first job"
 
I always see "bill gates" with a suits (however I never seen Steve Jobs with a suits)
 
@Sajad if you're a developer wearing a suit at an interview, they'll think you're applying for a PM position
 
getting syntax on 7 and 21
 
8:47 AM
 
@Sajad bill gates is a business man, not a developer
 
@levizoesch eh, why are you doing multiple if checks on the same statement? But SOMETHING like that, although lots of things wrong with the code itself.
 
going for a clean t-shirt is about as formal as I get
 
@FlorianMargaine actually steve jobs was a business man and gates is a developer
 
@FlorianMargaine what is PM position?
 
8:48 AM
I might wear a shirt at an interview...
 
"project manager"
 
@tereško agreed
 
for my last company I only had phone interviews though, then a lunch...
@tereško gates stopped being a developer a long time ago
 
Even for a phone interview, I'd wear a shirt
 
@FlorianMargaine good for you
 
8:49 AM
@FlorianMargaine gates never was a developer
 
@tereško I thought he worked on basic?
 
nope
 
but he developed some version of basic iirc
 
Yeah, my interviews are often wearing t-shirts and take place in a pub.
One time the interviewer wasn't even wearing shoes.
 
Was it Joe because he'd lost his pink ones?
:D
 
8:56 AM
@Jimbo it would only be coincidence if I were dressed ...
 
@JoeWatkins lmao! How's the bike going?
 
how do I select 1 unique value, and add a KEY 'name' to it ?
 
@Jimbo great :)
 
SELECT FSP as "First Sport Package" ?
the FSP value is in the 'type' column
 
8:59 AM
that has been going around for couple days already :P
 
SELECT FSP as nameofproduct from type AND CONCAT('$',TRUNCATE(AVG(payper),2)) AS Average Phone Pay FROM rep_commission WHERE type='FSP'
where did I go wrong ?
 
ok, I'm off
 
ciao
@JoeWatkins You got yourself some full leather / textile gear right?
 
9:17 AM
@Jimbo not full yet, decent jacket and gloves ... no trousers yet though ...
 
@Andrea I didn't vote against it because I liked the idea of \u.. the error raising is a minor issue (that I'm clearly in the minority in disliking). That said, I deliberately didn't "yay" vote.
 
@JoeWatkins Going to PHPH next week?
 
@Fabor hope so
 
@JoeWatkins I'm not around unfortunately but @Leigh is.
 
cool, will arrange to hook up closer to the time ...
why aren't you around ?
 
9:29 AM
Heading home to spend some time with friends.
 
ah cool ...
 
I'll give @Leigh your number, assuming it hasn't changed.
 
where's home then ? (I thought you were home)
it hasn't changed
 
Technically Wantage (near Oxford). It's where I grew up and a few close friends moved back there last year.
Only an hour or so drive
 
hello
 
9:31 AM
cool
 
hey guys have any of you done rails?
2
 
We missed you at PHPNW.
 
Tis all good. PHPSC 2016 got confirmed. So there's that next.
Just do a talk instead then everything is covered :P
 
yeah ... by the time I had decided to do a talk, cfp was shut ... I'll get one in early for sc ...
is across the river/water/solent whatever, so even if I don't get a slot, I'll be going ...
 
9:42 AM
Good good. What are your topics for potential talks?
 
10:00 AM
I'm not sure yet ...
maybe something 7.0 related ...
afk, gonna take dogs out before it starts raining again ...
 
Anonymous
@Abe ping
 
Abe
yo
 
Anonymous
We talk and do some work mostly between 7-10
 
Anonymous
@Abe what say you?
 
Abe
wat?
 
Anonymous
10:10 AM
I just gave you a link to join if you want
 
Abe
WAT
if you gave me a link you deleted it :P
 
Anonymous
Yeah, it was there link for a minute.
 
Anonymous
Never mind. We don't allow sloths to join our project :D
 
Abe
lol
afk
 
10:25 AM
morning
lonely... this room is lonely
 
I'm not lonely :(
 
because you have no idea, how active this room was :(
 
Perhaps.
 
It can be, but Mondays are often busy for real life work.
 
hi
need help for php debugging
anybody there?
 
10:41 AM
Anybody where?
 
has anyone installed apache 2.4 on an windows machine before?
i'm getting really weird things with code igniter on it
oh wait, they are just detecting the base_url in a weird way
 
I... um... why?
 
10:58 AM
@salathe Ah, okay. Unfortunately wiki.php.net doesn't let you explicitly abstain, so without asking I didn't know if you simply hadn't participated
 
@Fabor Real life work? What's that?
 
heh. You got some more ratings I see.
 
Yay :-) One guy said good things but gave me a 4. The trolling bastard
 
so how did the talk go then guys ? @Jimbo @Andrea ...
 

« first day (1815 days earlier)      last day (3119 days later) »