« first day (2320 days earlier)      last day (2627 days later) » 

Wes
12:05 AM
@NikiC should i reuse tombstone buckets when adding, or should i always add new buckets?
 
Anonymous
@PeeHaa dunno, she was from Amsterdam so I presume you know her
 
Anonymous
Jo wes
 
@JayIsTooCommon lol
When were you coming here again?
Btw scratch that I will ask tomorrow again
Had a way too long day yesterday and about to crash
Noight all
 
Wes
\o
 
sigh, I hate PHP. I remember why I avoid it ;)
you can't test an extension that depends upon another...
 
12:17 AM
@ircmaxell lxr.php.net doesn't seem to be working right for me; can you link what you are trying to show from here? lxr.room11.org/xref/php-src%407.0/Makefile.global
 
86PHP_DEPRECATED_DIRECTIVES_REGEX = '^(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
87
88test: all
89	@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
90		INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
91		if test "$$INI_FILE"; then \
92			$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
93		else \
94			echo > $(top_builddir)/tmp-php.ini; \
basically, strips all non-static extensions when running tests
so if you have a hard dependency on another dynamic extension, you need to add --EXTENSIONS--\nblah to every single test
 
morning
 
Wes
12:36 AM
\o
 
@Wes you can reuse them when adding
 
Hi! Need some help about sql query
 
12:56 AM
Hi! Created a question yet?
 
Wes
@NikiC thanks :P
still no idea what i'm doing. or actually, it looks so simple that i'm probably doing something wrong
 
1:39 AM
can anyone tell me why I cannot send email?
 
1:52 AM
if you give more information maybe yes
 
@Riccardo I use Gmail, I login to the web client and send one if I have to.
 
2:50 AM
1 hour later...
Morning,
 
Wes
3:03 AM
**100 years later...**
future sucks. _kills himself_
fu md
morning linus :B
 
3:58 AM
5
Q: Paypal: PHP SDK Error Incoming JSON request does not map to API request

Ankit ShahI'm using PHP Paypal SDK: https://github.com/paypal/PayPal-PHP-SDK Referred PayPal REST API through PHP SDK return "Incoming JSON request does not map to API request" In continue with Paypal How to get Payment Id on basis of Transaction Id On basis of already available Transaction Id, Need to ...

4
Q: Magento 2: How to change Payment Action Method on the fly in Paypal Express

Ankit ShahI have already created Paypal/Developer/Sandbox Account. Already got API Credentials. Downloaded PHP SDK http://paypal.github.io/PayPal-PHP-SDK/ Referring: https://developer.paypal.com/docs/api/ https://devtools-paypal.com/guide/expresscheckout/php?interactive=ON&env=sandbox I have already do...

 
I wonder if anyone will notice all the swearing in the commit log (and maybe a few fixer shell scripts).
It's not unnecessary. But still. "I had to, he used eval for simple dynamic property access !"
Also apparently the concept of database migrations is unheard of in certain countries
 
4:37 AM
mornin Wes
 
Has anyone ever discussed (eg on internals) / written an rfc to make it possible (or even default) to disable eval() support?
I'm sure it has legitimate use... Somewhere... For someone..... But I'm struggling to think of any mainstream use for it
 
What's a database migration? ;)
 
5:20 AM
its a special time in a developers life
when he or she goes through a period of change
and possibly yelling
 
6:10 AM
posted on February 21, 2017

New Cyanide and Happiness Comic

2
 
6:26 AM
@Stephen just add it to the list of disabled functions in php.ini?
 
don't think that works for language constructs, does it?
 
it does not
 
I didnt even know it was a language construct lol
 
executes the passed code in the calling scope, so it'd have to be
 
6:49 AM
@bwoebi the bug is again in action... can reproduce it...
 
@PaulCrovella not it doesn't have to be, a function could detect calling scope ... it just happens to be
 
that'd be weird though
 
there is no remarkable difference between include and eval, it's the same thing to the engine ... the fear of eval is irrational ... what you should fear is unsanitary input, whether you use eval or not ...
@PaulCrovella only as weird as func_get_args
 
true, but eval lends itself more readily to misuse as you don't have to dump shit to a file first
func_get_args is weird
 
well what do you mean by misuse ?
evaluating code is not misuse of eval, it's intended use
evaluating or using unsafe, unsanitary input is programmer error, nothing whatever to do with eval
 
7:01 AM
I do mean chucking in unsanitary input. I know that's not ultimately eval's fault, but that problem would be reduced without eval.
guns don't kill people, people kill people - but drive-by knifings are harder to pull off, and all that
 
Wes
mornings
i like that phpstorm is very actively developed, but for each new added feature they accidentally kill another one :B
 
@PaulCrovella without eval, someone would just write the generated code to a file and include it ... you avoided nothing
 
some would, some wouldn't. that wouldn't is the reduction.
 
Wes
@param A|B $foo used to work, now if you pass other stuff than A or B instances, it shows no warning
 
@PaulCrovella no they all would, what other path is there to do the same thing ?
 
7:06 AM
they take a different approach to solving their problem
 
but you are assuming that generating code is never legitimate
 
not at all, I'm not even suggesting eval should be removed or not used
 
you are assuming that there is a superior approach to generating code, it seems to me
 
Hi. I am looking for a way to save code snippets in Mysql database. I need to retain the format while fetching them back to display. How would I go about doing that. Please give me an idea?
 
@JoeWatkins based on what?
 
7:08 AM
saying that they should or could take a different (and so superior) approach ... what if evaluating generated code is the superior approach ...
 
@JoeWatkins uses for eval are not always what you think
 
@JoeWatkins what if it isn't? one of the most common misuses I've seen have been new people trying to do something like make a calculator, so they dump the input into eval to let php math away
 
e.g.
literally a line from something i've inherited:
eval('$empty = (($model->' . $column . ') === null) || (($model->' . $column . ') == "");');
 
@PaulCrovella then it isn't ... but you can't say in a world without eval that people would do anything other than hack include to use eval, because they may have a proper use case ... I don't know what it looks like, but I can't assume it doesn't exist
 
or an even better one
eval('$val = $model->' . $key . ';');
3
 
Wes
7:11 AM
lol @Stephen
 
fixing every issue isn't in scope for my contract
but if it was
i then have to check every usage of that method to see what '$key' might be
or where it comes from
 
@JoeWatkins again, I'm not advocating for a world without eval, and I'm not saying that without eval nobody would hack around with include, only that a problem would be reduced. and it would, (many of those people don't know how to write shit to a file in the first place)
 
I ... don't know how to cater to those people, and don't think we should :D
 
we shouldn't, but you can't do a proper cost/benefit analysis without honestly looking at the costs
 
the "workarounds" can usually be prevented too though
no filesystem write access and open_basedir
 
7:17 AM
it's a turing complete language, you can use it to evaluate itself one way or another
 
right, but the people who are doing eval('$val = $model->' . $key . ';'); don't know that
 
someone forgot to switch accounts:
that's right! thanks so much — chipchip 29 mins ago
 
wtf
 
they spammed a bunch of answers with links to that site today, both that account and the one that answered that question.. looks like most are deleted now but weren't removed as spam
 
7:35 AM
moin
 
mornin
 
moin moin
 
moin moin moin
 
anyone use slim
 
I have allergic reactions each time I go on a npm package github page
"We're on discord/slack/other studip communication protocol because we're totally geeks!"
 
Anonymous
7:51 AM
moin
 
o/
@Stephen so far I actually haven't seen one yet, mostly it's just really crappy code and it's on 5.4.16
 
Anonymous
!!wotd
 
statecraft: the art of government and diplomacy.
 
also realized 5GB of it is user uploads && generated pdf/csv files
 
@Jeeves that was yesterday's one, you elephpant
 
7:53 AM
still
thats 12gb of code
 
Anonymous
@Jeeves original.
 
thats.. a lot
 
yeah indeed
 
is it in git?
 
obviously not :D
expect the worse here
 
7:54 AM
rcs?
 
hg?
oh
classAv1.php
classAv2.php
... etc
 
nothing, just literally multiple copies of same file with _dev1/dev2 added
yeah that
for almost every dev ever worked, there's a copy of the same file, each modified in a different way
 
mornin'
 
and they're filled with commented out code too?
 
mornin Adil
@PaulCrovella yeah but I even spotted comments like // FUCK! This can't get worse than what it is
 
7:57 AM
at least there's some self-awareness
 
indeed
literally a huge legacy soup
 
can't. type. feeding. infant.
developer tears minestrone
 
Anonymous
lol
 
cream of code
 
cyclomatic complexity chowder
 
8:03 AM
is it oop or just a heap of mixed mode files and a million global functions?
 
bits of all
 
or did they not bother with functions
 
all of the above
 
variety is nice
 
db credentials in configg.php (and no, that wasn't my typo here)
 
8:06 AM
presumably the last version was configf.php
 
nope :P it's with moar g's at the end
 
@Ekin was it you with the "upldoaling" typo yesterday?
 
thinking it was Paul mentioning it?
 
you mean ulpadonig
3
 
@Ekin too early, brain not functioning properly
 
8:08 AM
my favorite word for a day and I already forgot about it, thanks for the reminder
 
:) same here
 
@PaulCrovella Sorry, I'm not proficient in elgnish
 
what's great is someone suggested an edit with the comment "fix typo" changing it to "uploding"
and it was accepted
 
suggest an edit to "upldong"
 
updong lol.
 
8:19 AM
I considered rolling it back, but didn't think they'd appreciate the joke
 
just suggest further edits
 
hi there, need some "guidance" on passwords with php... Actually, I use password_hash from PHP. Is there a better way (but as easy to use) to keep passwords safe with PHP?
 
use password_hash
 
I'm going to do code on my sever what is the best way to do it
 
with code.
 
8:27 AM
wear a rubber
 
@Stephen what do you mean "with code" ?
 
@Julo0sS i was replying to @AndroidDev there
 
^^
 
for you my reply was "use password_hash"
don't store/log/email/do anything besides hashing the plain text
 
@Stephen what do u mean
 
8:28 AM
@AndroidDev what do YOU mean
 
what does anything really mean
 
!!dad
 
Have you read that book about Stockholm syndrome? It was pretty bad at first, but by the end I liked it.
 
lol im not sure i will be able to tell dad jokes. i don't they will "work" here.
sarcasm and play-on-words don't work well for a second language.
or sometimes for a first.
 
Anonymous
we're used to @Gordon's jokes, anything will be an improvement
 
8:31 AM
Mornin'
 
@AndroidDev Just don´t!
 
@JayIsTooCommon so would be putting a mask over your face :P
 
Anonymous
rude.
 
you started it by pinging me with insults
 
Have anyone used github.com/rowanhill/wiremock-php and does it behave properly?
 
8:34 AM
I mean should i have to use git
on the server
is it possible to install git on server and use it in my phpstorm
is there any tutorial about that
@GerdRönsch and @Stephen
 
um
wat
phpstorm can interact with a server via ssh
but i don't know if it supports a remote git repo
but thats beside the point
whether it will or not, just.. don't.
 
@AndroidDev it seems you dont understand what the purpose of git is
 
i just want to pull my code on the server
that's it
it can be git or what everything that u think
 
moaning
 
morgngifnbfgds
 
8:38 AM
hey hey
 
monging
 
Anonymous
hoi paaha
 
Anonymous
@Gordon i was just trying to flirt
 
@tereško can u help me
 
@JayIsTooCommon that's so updog
 
8:41 AM
b'morninis!'
 
@AndroidDev start reading git-scm.com/book/en/v2
 
Anonymous
@Gordon your vicious tricks won't work with me.
 
Anonymous
moin pmm
 
@JayIsTooCommon regrettable
 
are you trying to prove there is active use of binary strings @pmmaga
best phrase ever, when the contract states you have to make prod work "like it does in dev": "ok so its also not working on dev
so we can just ignore it for now"
 
8:48 AM
@Stephen b"yes, it's my way to cope with the failed rfc.. :P"
 
@pmmaga the rfc was to deprecate right? and it didn't pass.. so, b'' stays?
 
@Stephen yup yup
 
... so now everything is b''. lol
 
Hi guys, I don't understand something regarding to the SSH2 functionality in php.

I have to connect from server1 to server2 and server3 using a public and private key.
But from what I understand from the documentation, both keys are on the server, while I actually have to get 1 of those keys (assuming its the private key) to be on server1 and the publics on both server2 and server3.
 
this chat needs a high five command
 
8:50 AM
moriioyuyuth @PeeHaa
o/
 
I am struggling with something for a while now and I am not sure if I use the correct keywords to find the answer to my question... Let's say I have a var $pet = 'dog' and a $string = "<div class="a stupid class with double quotes">Hello I am Jame's '.$pet.'</div>"; and I want to echo my string and display my html correctly how can I do to deal with all the escaping problems ?
 
However I don't really get from the documentation the sense on how to establish such thing.
 
@Stephen ✋
 
@Valentincognito try php.net/htmlspecialchars
@MikeM. ssh is client/server. the client has the private key, the server has the public key.
actually the client has both
but yes you need to get the public key onto the server you want to connect to
 
@Valentincognito define "correctly" and "problems"
 
8:54 AM
@PaulCrovella is there a borat "high five" emoji? lol
 
yo guys
@NikiC had a gists or something about php7 objects being faster the array in some cases
can anyone help me findz it
=)
and mornings
 
But from the documentation in php, I only see they gave a path to both keys, however I assume, this is from the server2 and server3, yet those servers only contain the public key...
 
ah shizzle nevermind found its, sorry bout the trigger finger =)
 
@RonniSkansing check gist.github.com/nikic ?
 
yes lol I dunno how I missed it first time
and It actually didnt take a lot of googling.. so shame on me
 
8:56 AM
@MikeM. the php code will be the "client", so you should have path to local pub + private keys on the server running the php
 
@PaulCrovella My main problem is that my $pet variable doesn't show up
I mean I litterally see it as" $pet
 
@RonniSkansing there's a gist in response to julien tweeting something, but I think that's not what you're looking for
 
@Valentincognito create a mvce somewhere like eval.in or 3v4l.org
 
it's just a brute fact that declared properties are going to behave faster than array lookups in some cases, the logic for access is much simpler, and cached
 
@Valentincognito are you sure thats a correct copy of your code? you seem to be mixing single and double quotes... incorrectly
 
8:58 AM
it is on purpose
 
$foo = "some thing with"quotes" in it "; is not valid
 
the thing is I receive some HTML code from an email template online editor
and I want to include an unsubscribe button when I send the template
@Stephen I know it's not valid
 
so, you do an ssh2_connect with ssh2_auth_pubkey_file(rs from ssh2) and all the other arguments ssh2_auth_pubkey_file expects.

Then ssh2_auth_pubkey_file reads the keys off from it's own server (thus the client) and receives the public key from the server servers and compares it or well, if the comparision is okay the ssh2_auth_pubky_file() returns true..
 
um
 

« first day (2320 days earlier)      last day (2627 days later) »