« first day (1868 days earlier)      last day (3304 days later) » 

00:00
@methhead yeah it should work, I think.
YAAAY i did it
I know it's not secure but it's a uni project #screwthesystem
Another one falls to the dark side..... I fear for the security of web systems everywhere in the future
@Andrea how do you specify which to use re: clang vs gcc when compiling php?
But you certainly weren't running the code that you posted
00:02
I'm going to look into prepared statements and PDO tomorrow. But for this project, security does not matter as
a) I have not been taught it
b) time is tight and i have the walking dead to catch up on xD
@rtheunissen the CC and CXX environment variables with ./configure
@bwoebi how do I get the instruction count with valgrind?
@Andrea --tool=callgrind flag
Thanks
Goodnight all
756,455,717 (optimised), 744,469,730 (unfixed), 754,075,468 (fixed)
Huh.
So the two faster versions are executing a lot more instructions.
00:08
this was gcc or clang?
GCC.
Going to try clang now.
lol
clang results: 925,791,973 (unfixed), 924,605,145 (fixed), 922,185,296 (optimised)
925 M ops? compared to 756? wtf?
00:11
Well, this explains why clang was so much slower, it generated more code. But this is interesting. The fixed version has less instructions, the optimised even less
@bwoebi clang was like 33% slower in execution time, this must be where it came from
@Andrea well, for one that's because clang doesn't know about the global vm registers
which is probably very significant in a tight loop ;-)
@bwoebi global vm registers? is there a GCC flag that lets us assign certain globals to registers?
well, it's obvious why optimized is much slower; you added extra instructions (fetch extended_value+and+cmp+je) which are just optimized out usually… additionally they're unpredicitble branches…
@Andrea we have execute_data and opline in two registers during whole program
it's saving a lot of fetches
@bwoebi ah, neat
@bwoebi yeah, I can understand that
But I have absolutely no idea why optimized is taking less instructions in clang and more in gcc, regardless of your test program…
except if gcc has inlined something clang didn't…
00:23
yep
I'd need to compare both directly with --dump-instr=yes …
does that dump every single instruction executed or something?
it counts which instructions are executed
@bwoebi ah
00:26
and then you can look at it with cachegrind (which will execute an objdump)
This is something that Vtune is pretty good for: software.intel.com/en-us/intel-vtune-amplifier-xe
@bwoebi how do I do that?
looks like it had already dumped the info anyway, I didn't have to tell it to
@Andrea you're currently using OS X and looking at the callgrind output files with qcachegrind?
I haven't looked at them
they're there
yeah, well, look at them
00:31
how?
qcachegrind.app?
you may need to install it first ;-)
ah :)
aha, q- is for Qt
yea
Well I have it installed and open now, but I have no idea what to look at :p
Oh.
--dump-instr did matter
:-P
00:44
oh great I need to install objdump
Indeed… Thought it was preinstalled… but it's in /usr/local/bin, so I guess, I had it installed myself…
well I had to symlink it since the homebrew binutils package installs gobjdump
but now it works, yay
/me is not a brew user ^^
macports?
neither… compiling manually.
00:49
heh
makes some things simpler…
It's a total mess… that brew thing. and macports isn't better.
especially in the cases where it doesn't work.
@bwoebi kinda works for me, but I didn't customize any shared libs on my system
(brew)
brew usually works for me
yup, I got 5.5, 5.6 and 7.0 installed with that
I like how it compiles from source
00:55
Yar, except when it reaches HHVM :P
yeah, I didn't achieve to compile hhvm locally… :-(
that just works with brew atm
or else VM and a few beers
well uh
@Andrea yeah, for most gnu tools it's fine though… but beware when you try to overwrite something installed with brew…
I can't say looking at these asm instructions is tremendously helpful
00:57
can't run coverage against my PHP7 libs atm >.<
@Ocramius just run phpdbg -qrr?
not installed
@Ocramius patch your local copy of the formula?
@Ocramius install it?
@bwoebi don't wanna mess with the homebrew setup :P @Andrea yeah, could probably do that <_<
feels nasty tho
00:59
yeahh
@Ocramius see, that's the problem with brew…
well, it would be the same with apt or yum :P
If you mess with it too much, it just stops working
^ what I just said ^
@Ocramius nah, with apt you just install a fake package about version met and be done…
01:00
Can do here as well, but then I'm on my own for upgrades
I think I have PHP 10 on some machine in the package list xD
@Ocramius sure
but it's not more than a pull and a make install
yes, but it's manually managed then
merged?
I did it for my nginx and now I feel like I need to go back and check it every second day due to security issues
(was too eager to use HTTP2)
@bwoebi PHP 10?!
01:03
oh, actually, I forgot: ocrami.us
gotta upgrade it to use letsencrypt <_<
@Andrea yeah, a random high enough version number for the next years ^^
party hard, but only safely
@bwoebi fake package overrides the legit ones from sources.list places?
@Andrea basically
 
1 hour later…
02:10
@PeeHaa one to add to your google anger file: recode.net/2015/11/24/…
350K views... =o\
> Postman's book is a harsh diatribe against the television industry and its effects on intellectual discourse in the United States. Postman argues that television, especially when compared to the written word, cannot foster deep, rational thought in its viewers, because it requires absolute passivity from them. Television can only be about entertainment, and its cultural dominance, Postman argues, has had negative effects on education, politics, and religion.
Anonymous
02:29
Didn't know PHP was suited for cloud hosting software github.com/owncloud/core
04:48
hi everybody how I can convert svg to png without imagick and batik in php?
Abe
Abe
morning
@samayo could be a good time to make a blog platform. my prediction is that wordpress is going to die in the process
rewriting the core is easy, a gazillion plugins not so easy
05:30
sorry i need some help here.
When I var_dump 2 strings, the results is shown below:
string(3) "20"
string(2) "20"

As you can see "20" has a of string(3).
But no matter how i preg_replace and trim. The additional string wouldn't go off.
May I know how I can debug from here?
Abe
Abe
05:42
@Noobie using this for example
$str = "abc";
for($x = 0; $x < strlen($str); $x++){
    echo ord($str[$x]) . " ";
}
05:54
hi
how to find the not sent mails in swift mailer
Abe
Abe
\o
06:18
looking for wordpress little help
user924016
07:01
Fryyyydaiii!!!!
user924016
[rebecca.blackfriday] seems appropriate
Abe
Abe
30m trying to spot an error. turns out it was a bug in __debugInfo()
[rebecca.blackfriday](http://rebecca.blackfriday) @RonniSkansing :P
My prediction for this year's Black Friday death count is at least 5. Anyone want to wage some rep on their own predictions?
I'll bet 150rep
never underestimate Wal-Mart shoppers
Abe
Abe
would be useful to have way to switch back to the "default" __debugInfo() handler:
class A{ function __debugInfo(){ return ['boo' => 1]; } }
class B extends A{ function __debugInfo(){ return default_dump($this); } }
cc @Sara
07:42
Good Rebecca day everyone!
Maybe the middle backseat always be available to you!
5
user924016
@Abe thx :)
Abe
Abe
:D
Is there something wrong with using SlimPHP? :) -- slimframework.com
Oh and welcome back to us "regular" users @Gordon :)
07:59
@Duikboot last time I used it I had great problems to enable CORS, the devs didn't want to merge anything despite fixes were BC
morngin
user924016
08:23
posted on November 27, 2015 by nlecointre

/* by Spidlace */

How can I convert svg to png without imagick and batik in php?
moin
0
A: How can I run multiple fsockopen() asynchronously

Joe WatkinsWhat you really want is to use asynchronous, or non-blocking I/O. In computer science, asynchronous I/O, or non-blocking I/O is a form of input/output processing that permits other processing to continue before the transmission has finished. There are many frameworks allowing you to perform...

does anybody develop a HATEOAS API for mobiles using php
?
How does API send the Client Design ?
I hate when I notice stupid typing errors AFTER I've hit enter.
08:46
oh yay, friday
not sure why that is being down voted
Sorry Joe you get a downvote for not answering the questions directly and answering with an alternative (to multiple fsockopens() and running a script multiple times) without explaining how it's different and why it's better* (*presumably you offered those because you think it's a better approach). And, because E_SCROOGE.
And, happy Rebecca day one and all.
> A stream in non-blocking mode will return early rather than wait (block), allowing you to read from or write too another stream, or even perform some other task while the equivalent blocking code would force you to wait.
morning guys
@JoeWatkins Correct, and? He can use fsockopen() without blocking too.
09:02
I think I've directly answered the questions now ...
oh wait, is it not clear that fsockopen returns a stream ?
@salathe
@JoeWatkins much better for the question :) (I added a little paragraph too, hope you don't mind... feel free to edit/remove as you like)
Morning Friday friends!
I was just working on that ... I think it's better now @salathe
I was initially responding to the first answer, without really realizing it ...
I've never had to work that hard for internet points ...
09:28
hi all
@JoeWatkins haha
Don't suppose anyone knows where one could get a cheap basic kindle? With all the PHP books in modern times coming out in ebook form only, I'm looking to try and pick them up
Proper tablet screens totally dry my eyes out over extended periods so they're ruled out
@Sean The basic kindle from amazon doesn't cost that much the first place :o
Otherwise you could always purchase a used.
does anybody develop a HATEOAS API for mobiles using php. For android ?
09:36
That's a good point actually :V
> Tokutek claims to improve MongoDB performance 20x. It is unclear if this also means losing 20x as many documents.
I lol'd
I bought the kindle paperweight and I love it. so pleasant to read on
http://thecodinglove.com/post/134050621064
The coding love
When they ask me to choose between 2 technologies
nlecointre
1448617220
paperweight? Freudian slip there?
none works, ofc
09:43
:D
@JoeWatkins Dude, you have a house...
@DaveRandom Freudian?
Hi could someone help me please.

With SQL, can i use wildcards to return data with a specific first and last letter
@Epodax It's called "paperwhite" but you said "paperweight", implying it's useless...
almost .. weekend.
Good morning
@DaveRandom Oh, no. My memory played a trick on me and I couldn't remember the name completely, I quiet enjoy my kindle so It's far from useless.
@methhead yes
@gordon so if i wanted to return results beginning with "s" and ending in "n"
Could i use:
SELECT lastname
FROM stud
WHERE lastname LIKE 's%n'
@methhead try it
Not sure if that's legal. You might have to split it into 2 AND ... LIKE conditions
Looks legal to me.
09:58
I live life illegal
@methhead assuming you are using mysql: dev.mysql.com/doc/refman/5.7/en/pattern-matching.html
SELECT fullname FROM user WHERE fullname LIKE 's%n';

> Simon ***son
> Steve ***son
> Susan ***son
etc.
mornin'
Mornin' teresko!
Does anyone know when Zend certification for 5.6 or 7 will be available?
10:01
@tereško yo dawg
@crypticツ maybe @ircmaxell
@Gordon did you already know everything PHP or did you study for your exam?
Do you get a lot of worth out of a Zend certi?
@crypticツ when I did the exam there was mock exams available. they were part of the certification package. I did 3 of them. Passed them all on first try, so I didnt work through any of the other materials they suggest, e.g. study guide or something. Not sure what the exams look like nowadays, but I can only strongly recommend to familiarize yourself with the all these string and array functions, like learn them by heart, so you know the parameters to strpbrk
$995 for the package seems really costly
10:07
I learned for it but never ended up taking the exam - it was more important to just learn the functions (and tbh I can't remember the ordering for a lot of things, that's what the manual is bloody for and takes seconds!)
@Sean you'll get listed at the Zend Yellow Pages. I got very little contacts through that though. If anything, it might help you get tiny advantage when recruiters are keyword bingo searching for zce.
@Jimbo the exam has no such bs, fyi
I hate learning anything that can be looked up just for the sake of an exam.
@Ocramius it definitely had when I took it. Lots of it. Memo questions all over the place.
@Ocramius I was told parameter ordering, trick questions...
Fuck that
10:09
@Jimbo wtf? ZF1 exam maybe.
Hmm, what will the 7 exam be called :D
> The exam is a collection of 70 questions, covering a good range of PHP and web-related topics. The questions are either multiple choice or free input. Question tasks include analyzing code snippets for what they are doing. Or they might ask for appropriate functions, methods or interfaces applicable in a given scenario. There is also the occasional question about Design Patterns (at least in the Mock Exams).
> Unfortunately, there is also a good portion of what I like to call “memo-questions”. These will ask you about argument order or which variation of a function name exists. Personally, I find those type of questions completely pointless. If I forgot whether the $haystack or the $needle comes first, I know where to look. Same for function names. Those questions should definitely be ditched.
blog.gordon-oheim.biz/… that was 2011 though. if they fixed that: awesome!
Zend learning programme on how to code good and do other stuff good too.
@Gordon the only memo questions I remember are pretty much related to crypto, eh :|
maybe you were just lucky. the questions are randomized afaik
@Gordon I reviewed them :P
Might just buy a bunch of exam vouchers and brute force my way past the shitty questions :D
@Jimbo given your knowledge level, you should pass it with ease
Unfortunately, no YAML questions
but that's for the greater good
> The only except is for those who have passed the Zend PHP Certification exam and live in Ontario, Canada. For legal reasons you cannot use the designation "Zend Certified Engineer" on your resume/CV or business card.
wait, what, wtf
@rlemon ^^
@crypticツ are you at any conference soon? I got a bunch of 'em
10:14
@Ocramius what do these vouchers do?
They are just stickers
recognize the guy maybe?
@Ocramius can you save one for me, pls?
seems like I still got 10
@Ocramius are we talking the ZFCE or ZCE?
gotta poke that gary guy and get me a few thousand sent
@Gordon both, although for ZCE I only got to review stuff
10:18
@Ocramius I remember there was a lot of changes for the 5.5 exam, so if they got rid of the trick questions, I am very happy about it
The sad thing is probably would have done better at the trick questions than the actual knowledge ones.
Yup, loads of BS out FWIW
@Ocramius looksie starred section ;)
@Ocramius hehe
Ha, didn't see it
Oh @JoeWatkins You're moving? How come.
No mod powahz @Gordon :-(
@Feeds thanks
@DaveRandom yeah, gave them to @MadaraUchiha … dont have the time for it anymore
imho, ZCE is only useful if you have 0 years industry experience.
@Gordon Fair enough :-)
10:30
I blame you Gordon if Madara suddenly becomes a supervillain.
"becomes"?
Technically, in character, he's already a pretty super villain ;)
@Leigh - disagree, IMO it shows a commitment to becoming a better PHP developer, not simply an ability to memorise or pass exams
I'll certainly be taking the php7 certification when it comes out
@MarkBaker I consider it, too
And I don't recall a single argument order question from my ZCE5.3
10:37
@Epodax I expect you to complain with "Gordon would never have done such evil things" ;)
The only really questionable question was one that assumed a specific return sequence from an SQL database without allowing you to specify an ORDER BY
@Gordon I will make a fuss, I promise you that ;)
I wonder how one goes about being involved with formulating the questions (for ZCE)
@MarkBaker There's nothing you can get from it that you can't get from practical experience. There's better ways of showing that commitment in my opinion.
interface Doge
{
    public function howTo($verb);
    public function many($noun);
    public function much($noun);
    public function so($adjective);
    public function such($noun);
    public function very($adjective);
}
^ just found that in a project at work :-S
10:47
Rofl
@Leigh - No there isn't. And I wouldn't simply use ZCE as the only argument that I might be a halfway capable developer. I'd never use any one argument.... that's why I also have github and other open source work, slideshares, etc
But if you choose to dismiss one argument because you have others, you're missing out.... arguments "stack up" and the more you have in your favour, the better
PHP 7.0.0 GA tagged on GitHub: github.com/php/php-src/…
@Andrea Oooh, exciting! I remember reading the discussion on it, but I wasn't too sure on what seat I should take on the debate.
@Sean I saw what you did there
@Sean PHP 7 is yesterday's news, anyway. Tomorrow is PHP 7.1, and PHP 8 comes afterwards. I don't want this renaissance to end.
4
PHP is a glorious language
user3119231
hey, isn't it possible to header location to another file if the php is called by ajax?
Did Last night's fun:
PHP 7.1.0-dev (cli) (built: Nov 27 2015 00:58:28) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2015 Zend Technologies
Already testing some of my stuff against 7.1
Heh
I don't think very much has changed in 7.1 yet. checks
will php7 be released on friday?
11:11
More likely to be on a Thursday
@Gordon well in that case we should be getting down on friday, looking forward to the weekend
That's match with the RC cycle
@MarkBaker yeah, it's scheduled for the 3rd, which is a thursday
@Andrea unacceptable
@Gordon indeed
Abe
Abe
11:22
o/
\o
o/
Abe
Abe
so hacklang doesn't have boundaries in generics am i right or am i bad at searching?
@MarkBaker Not sure if the "No there isn't" is for the first sentence or the second...
11:31
$injector->share('PDO');
$injector->define('PDO', [
    ':dsn' => 'mysql:dbname=' . $configuration['database']['databaseName'] . ';host=' . $configuration['database']['hostName'],
    ':username' => $configuration['database']['username'],
    ':passwd' => $configuration['database']['password'],
    ':options' => [PDO::ATTR_EMULATE_PREPARES => true]
]);
Guys, I can't seem to pass variables into that part.
It says its null, but it isn't.
Any help?
@HassanAlthaf be more specific?
I'm trying to use Auryn injector..
I have an associative array called $configuration declared in that file.
ah, I'm not familiar with Auryn
I'm trying to use it.
Oh
@HassanAlthaf why are you emulating prepares?
11:37
Oh shit, it was meant to be false.
Lunchtime gifs -_-
picked up this game on the autumn sale: store.steampowered.com/app/290770
looks promising
It's not lunchtime yet. Stop making me hungry!
So you buy an awesome new PC and play side-scrollers @tereško :P. Deus Ex trailer looked good.
@Fabor I have pretty extensive wishlist: steamcommunity.com/id/teresko/wishlist
11:41
Steam Controller? I hear it's not great.
it's more as a reminder for now
I need to get some controller
heh Elder Scrolls III :P
thing is: I try to buy stuff only when it's at 80% or better
THANK YOU, @Fabor !!
It's nothing. Dishonored is a cool game and at £2.50 -_- bargain.
I; regrettably, spent £6 on a hotdog yesterday.
Christmas Market is a rip off.
sounds like "xmas season" begins sooner each year
11:49
Yeah. I think I saw some xmas stuff before Halloween this year.
@Fabor Why. Oh man. 10 minutes. 10 more minutes.
What is the dough stuff?
Just looks like canned dough. Laziness in a can.
Abe
Abe
code style poll: do you add `else` for a function body containing an if/else condition only?
function a($a){
    if($a){
        return 1;
    }else{
        return 2;
    }
}
function a($a){
    if($a){
        return 1;
    }
    return 2;
}
perhaps the former is more readable
$output = 1;
if($a) {
    $output = 2;
}
return $output;
So the latter is a style I try to use, unsure why.
$output = $a ? 1 : 2; :D
11:57
There's also the ternary operator route, so yeah :P
Abe
Abe
damn you guys :D
Abe
Abe
@Sean also you are wasting memory by creating 1 just to override it a moment after!!!!!1111one
@Abe Yeah, every time I do it I always think this :P
@Abe The second option is my preference, unless I can use a simple return with a ternary expression
Abe
Abe
11:59
that's not an issue with scalars but certainly not ideal for objects

« first day (1868 days earlier)      last day (3304 days later) »