« first day (1412 days earlier)      last day (3540 days later) » 

2:00 PM
@rdlowrey Exactly you were right, I was running php info from apache, and running script in command line
 
@Ja͢ck btw I guess you'll be doing this already, but it would be nice to record how much smaller removing stuff from PHP decreases it's size.
 
8 mins ago, by Ja͢ck
Restart server.
@KoCour ^
 
@Ja͢ck Was easy to do locally (I think I removed it all, anyway)
 
1 message moved to bin
yw :D
 
2:02 PM
It is really a matter of: "Do we think third-party extensions are done relying on it yet?"
 
put your complete code, their is must and logic or syntax error
 
@LeviMorrison Yeah, I had to port two core extensions ...
 
You had to replace their headers with the version from ext/pcre
Did anything actually use it?
 
@tereško send your all code , you have an error in writing it
 
2:03 PM
@DaveRandom lol
 
@LeviMorrison nah, somehow the pcreposix wasn't working well.
 
@user2829778 emm .. are you dunk or high ?
 
@tereško ALL YOUR CODE HE SAID!
 
fukno, most of it is under NDA
 
posted on August 28, 2014 by kbironneau

/* by alan_acus_to */

 
user895378
2:05 PM
@KoCour Glad we could help :)
 
@tereško you are toblem at upload statment, right ?
 
user895378
@DaveRandom @Ocramius @Danack I've been turning over one major potential API change for artax and I want to gauge your feelings on it if you don't mind.
 
@LeviMorrison But the code that relied on it (opcache and pgsql) was relatively easy to patch with actual PCRE.
 
user895378
Currently all Message::getHeader($field) calls return an array of individual header lines (as any header can appear multiple times).
 
user895378
2:08 PM
Often this is unintuitive for something like $response->getHeader('Content-Length') (for example) as people expect to get a string/int and not an array into which they need to index.
 
@tereško i meant upload statment
 
user895378
Would it mess you up if I changed the Message::getHeader($field) to always return the first header occurence and added Message::getFoldedHeader($field) (for comma concatenated values) plus Message::getHeaderArray($field)?
 
user895378
I've been considering that for awhile and if it's going to change it needs to change now ahead of a real release. Thoughts?
 
.. my answer stays the same: please read an understand the link I gave you
 
Srsly? Now I have to @json_decode(); we need a JSON_PARSE_AS_PRE_56
 
2:10 PM
@rdlowrey Having one that returns an array and another that returns the first element of that array is common.
@DanLugg eh?
 
@rdlowrey No, it wouldn't bother me. I think the returning the array is the correct behaviour, but I did find it a pain to get used to....and it is silly for some headers.
 
Well, I'm an asshole, and used it for something that isn't strictly parsing JSON.
 
OP just keeps giving
fuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck ufuck u — Domenico 4 mins ago
 
@rdlowrey Sounds fine to me.
 
This question appears to be off-topic because the OP is a wanker. — Dan Lugg 17 secs ago
 
user895378
2:12 PM
Cool. I just wanted to apprise you guys of that because I'd like to make that change and it will necessitate a some small changes in existing code.
 
@DanLugg json_decode() only supports @$sholes ;-)
 
@DanLugg Fighting fire with fire ey :P
 
@DanLugg I'd suggest deleting that before you get flaged
 
@DanLugg it was very hard to do the right thing :(
 
2:13 PM
@ircmaxell Aye. Suppose so.
 
eh, it'll get deleted
 
And, done.
 
it already was
 
you kids and your delete votes
 
@Ja͢ck I was using it to parse scalar literals from input, like TRUE, etc.
 
2:14 PM
it doesn't do that anymore?
 
It'll issue a warning on TRUE because caps.
 
@DaveRandom the php.ini doesn't seem to be in the path.
Configuration File (php.ini) Path => /etc/php
nothing there.
 
> 5.6.0 Invalid non-lowercased variants of the true, false and null literals are no longer accepted as valid input, and will generate warnings.
 
@DanLugg good
 
2:15 PM
@PeeHaa Nuts to your face.
 
:)
 
@DanLugg Does json_encode() give that warning too?
 
:-P
 
user895378
@DanLugg Wait, really?
 
@Ja͢ck No, because how would it?
 
2:15 PM
@DanLugg great, it's not a preference anymore.
 
user895378
@webarto Yeah, this is a good thing.
 
@Fabien Yes, the build process doesn't create one (neither would you want it to, as it would overwrite your config every time you rebuild)
 
@DanLugg json_encode(true) => "true" ... json_decode("true") (warning??
 
@rdlowrey Meh, workflow. I was using it for something I shouldn't have, but it "worked". And now it won't.
 
@DaveRandom So I should just add one I presume. Without a current .ini it just defaults everything I presume.
 
2:16 PM
@Fabien Yes
 
I wish we had a parse_literal that wasn't just eval("return {$input};");
 
@Ja͢ck It's not UPPERCASE, it looks good to me?
 
@DaveRandom Cool cheers.
 
@Ja͢ck Yea, valid output from json_encode must be valid input to json_decode
 
I'd say.
 
2:18 PM
namespace foo;

define('TRUE', false);

var_dump(TRUE); # false
@rdlowrey also, this ^
 
So ... how exactly did you end up with what you have now?
@webarto Yeah, @ircmaxell posted that a long time ago
 
Yes, it was him, right.
 
Arguably the correct behaviour hehe
 
I'm sure you've pointed that out to them :P
 
2:20 PM
no, but I would, and thank them for doing the right thing
 
So const TRUE = false; doesn't work, but define() has different rules apparently ;-)
 
yup, because PHP!
 
Yay!
 
php doesn't afraid of anything
 
sigh, if only i could just change the signature of parse_str() into array parse_str(string) ...
and get rid of that treat_data crap.
 
2:24 PM
 
Hi :) , How secure is PHP Sessions for an userId?
 
@Lukas Why?
Also WAT?
 
hahaha?!
 
Could you explain what you are trying to do?
 
it's API calls to a service layer that speaks to an external Python system also by calls, so the web app has to send an userId for each call to the layer -- meaning I want to know the risk of someone getting the user Id and call structure
so as to not be able to access data or write false data
does this come down to an HTTP/HTTPS type thing
 
2:28 PM
@Lukas Sessions cannot be changed clientside (if that was yuor question)
@Lukas Yeah you should run everything over tls
 
But would an external hijack of the outgoing call be possible?
or rather.. I get that, would someone be able to hijack the PHP session?
 
@Lukas yes everything in plaintext can be hijacked, but I hope you also have other means of checking the validatidy of the calls
@Lukas yes
 
hhhmmm oke - MAC address??
 
@Lukas The session is nothing more than an id being send to and from the client/server
 
I can link an mac to an user
 
2:31 PM
@Lukas MAC address can be spoofed
Or rather just changed
 
erhg, and an IP?
lol... fails
 
Are you running everything over ssl?
 
changing mac address on a phone is somewhat harder than on regular pc hardware, though.
 
@Lukas the best way to mitigate a session hijack is to 1) use HTTPS, 2) set your cookies to secure, and 3) set your cookies to HTTP only
 
@Ja͢ck It is?
 
2:32 PM
Lousy memcache class and it's lack of a constructor!
 
@PeeHaa Yep
 
@PeeHaa Im betting on it
 
@Ja͢ck I can't just go into a shell and change it?
 
@Leigh Will do that then...
 
@PeeHaa Not sure whether serious or @PeeHaa
 
2:33 PM
@Ja͢ck Sure I'm serious
I mean everybody has rooted his phone in here right?
 
Not mine :)
 
@Ja͢ck because you don't "root" windows phones, right ;)
 
hehe
 
@Ja͢ck I think the worry was more about third-party, but yeah. I actually didn't have issues with pgsql with drop-in header. Never attempted opcache since I knew someone else would do it :D
 
I would probably root my kid's phone(s) though, just so that I can install some "goodies"
 
2:35 PM
Awesome tanx everyone, quite new to the PHP scene and web Apps at that :) keep well
 
@Ja͢ck The way you just typed in "goodies" is scary :P
@Lukas np
 
@PeeHaa Privacy is something you earn haha
 
:P
 
Recently I've started to look at Android's "stocks app" with a whole new perspective heh
@NikiC You reckon I should add nowdoc to this patch? :)
 
user895378
I broke down and finally created another reddit account. /u/rdlowreyAtTheDisco is me, for future reference.
 
2:41 PM
Are you wearing rolling skates?
 
@rdlowrey T-38 minutes until that account ragequits.
 
user895378
@Ja͢ck No, but I have tied off my skimpy T-shirt into a knot to expose my lower abdomen.
 
@Ja͢ck sure, if we're doing it for heredoc should do it for nowdoc as well
 
user895378
I think we forget the sort of thing most average PHP developers get excited about with new releases:
 
user895378
> I really like the new wider info table for phpinfo() (of course the only time I use that page is when i'm compiling... but still, it's nice)
 
user895378
2:43 PM
lol
 
user895378
Of all the improvements in all the world to single out for praise :)
 
Also, while I'm doc surfing, does anyone know of something that could be purposed as a parse_literal(string $string) : scalar that can safely take a PHP literal from string to it's correct type?
parse_literal("true") // bool(true)
parse_literal("42") // int(42)
parse_literal("42.42") // double(42.42)
parse_literal("2 + 2") // warning or error or some other bed-shittery
// etc
 
@funkatron Scrolling up through the videos on your OSMI page, bottom to top, is like watching your beard evolve. It's majestic.
beard appreciation ... love it ...
 
lol
 
hello, what is the command if i want to insert a value into a table where a column is equeal with something? i tried this way, butit doesn works: $statement = $db->prepare("INSERT INTO user_table(`running`) VALUES(?) WHERE data = :data");
$statement->execute(array("Yes"));
 
2:59 PM
what is that? You want INSERT or UPDATE?
 
update, but i thought is like that way
 
user895378
UPSERT FTW.
 
INSERT ON DUPLICATE KEY UPDATE
 
Now do it in postgres :P
 
@DanLugg For scalars, null and indexed arrays (i.e. no literal keys), json_decode(strtolower($var)) would do it
 
3:02 PM
@DaveRandom Yea, true.
 
:-P
 
hehehhe
 
@DaveRandom This seems like something which should be in core, especially given the typical use-case of PHP.
 
@DanLugg yeh, var_import()
 
what? parsing invalid json that someone thinks is valid?
 
3:03 PM
That's basically what you want, the complement of var_export()
 
@ircmaxell No, literal string-to-scalar
 
hmmm... interesting thought
 
var_import() for sure.
 
#php did you try #phpdbg yet ?? #vardumpisnotadebugger
 
3:06 PM
Could it be possible to implement it such that var_import(var_export($var)) to always work though? What about var_import(var_export(['foo' => 'bar']))? The concern being that ['foo' => 'bar'] is sort of a non-literal expression.
 
will the following do what I expect it to: $timestamp = (int)$timestamp ?: null;
 
"vardumpisnotadebugger" lies!
 
Further, the concern being differentiating ['foo' => 'bar'] from ['foo' => 'bar' . 'qux']. The string would have to be parsed for operators, etc., and bork if encountered.
Someone internals-savvy could probably expand on this, if it's actually a concern for a var_import implementation.
 
@DanLugg why?
 
@DaveRandom Because then otherwise it's just eval()?
 
3:08 PM
it should permit constant expressions though
['foo' => 'bar' . 'qux'] === ['foo' => 'barqux'] always
 
var_import sounds great
Easy to implement, too
 
For one thing, I would want 1 << 8 to work (for example)
 
You could just parse it as an arbitrary PHP text then use the AST to validate it
@DaveRandom No.
 
user895378
@DaveRandom If you need help understanding how to do the NEWS merges without screwing things up let me know. It was a bit confusing for me at first :)
 
Of course, but I was thinking more along the lines that var_export(...) should always === (save for whitespace) var_export(var_import(var_export(...)))
Maybe non-scalars should simply be excluded, rather than making a whole pudding out of trying to permit arrays.
 
3:11 PM
@rdlowrey Does that patch actually need a news entry? I haven't really had time to look at it though, I just added the NEWS merge driver which (afaict) basically means it just gets ignored
 
user895378
@DaveRandom Every bug fix needs a NEWS entry.
 
@AndreaFaulds ...because?
 
@DaveRandom A serialisation format should not support operators
 
@rdlowrey I will try and do it later
 
That's nuts.
 
3:12 PM
^^ That was my thinking.
 
I don't see the harm if the expressions are constant, but I guess it does seem a little odd...
 
var_export(...) ~ var_export(var_import(var_export(...)))
 
@DaveRandom There's also the problem that operator behaviour isn't consistent across platforms, and may be subject to change
 
we have serialization forms that support expressions already. YAML, PHP, INI, etc
 
I wouldn't say INI is a serialisation format, it's for config files.
 
3:14 PM
@AndreaFaulds The same is true of constant scalar expressions in source code.
 
@DaveRandom Yes, but constant scalar expressions are code
 
So is the suggested var_import() - it's still evaluating code, just not in a way that can cause side effects.
 
Ehhhhh
As it happens, though, operators would be platform-independent if I get my way. If. :)
 
Hell, even var_export() generates actual code (__set_state())
 
a hack on a hack, but yeah :-)
 
3:18 PM
@NikiC I'm excited to get to use variadics and argument unpacking soon in production!
 
@DaveRandom In terms of userland impl, this is sorta inline with what I was thinking
Though, since it's not really the complimentary to var_export, I suppose it'd be parse_scalar or something like that.
Also, binary literals. Also, hex literals. Also, etc.
 
I have formatted right !. what else you need me to do, please let me know — NIkil Chowdary 43 secs ago
yeahno
Nice try @DanLugg. Now also make the actual question readable :P
 
lol, nah, I did my civic duty. Best edit ever ... -> [Save Edits]
 
hello @ dan lugg, if possible let me know your email id, I can send you brief description of my task, and what I did — NIkil Chowdary 13 secs ago
 
HHAHAHAHA
 
3:30 PM
That's what you get for trying to do your civic duty
noob
:)
 
user895378
Argument 1 passed to Artax\IteratorWriter::__construct() must be an instance of Artax\WriterFactor, instance of Artax\WriterFactory given
 
user895378
sp3llin' is hard, ya'll.
 
@rdlowrey Fear Writer Factor
@PeeHaa I dunno why I went with 92.
 
user895378
@DanLugg O'reilly Factor?
 
user895378
oh god please no kill it with fire
 
3:32 PM
@DanLugg :P
 
Because, y'know, that hasn't actually happened yet for some reason.
 
@DanLugg Your string impl is not right ;-)
 
@DaveRandom What, the catchall?
 
Aaaaaand another one bites the dust
uhhmmm you might want to change your database credentials now — PeeHaa 21 secs ago
 
awesome
 
3:37 PM
I gotta stop comment trolling.
 
[joe@localhost nginx-1.7.4]$ mysql -h l2t1314207241889.db.11119678.hostedresource.com -u l2t1314207241889 -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 13459296
Server version: 5.0.96-log MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> show databases
    -> ;
+--------------------+
| Database           |
they'll learn ...
 
quick, add stuff to it
 
give me hilarious tables ?
 
@Fabien @SecondRikudo @tereško naruto is out
 
3:38 PM
all your databases are belong to us
 
@JoeWatkins hehehe
 
cheers @HamZa
where?
nm found
 
@DaveRandom Nah, I was fine with unquoted string literals.
But I see what you're saying.
 
I'm hungry and I'm going to order food. This is not going to end well
 
@PeeHaa It's not going to end well for the food, no.
Oh, wait. Derp, you mean escaping.
Yea, well that.
 
3:42 PM
@HamZa Very fluffy.
 
@DaveRandom ...why is HHVM separate? I don't see the difference.
 
Team 7 is clearly the best though.
 
@LeviMorrison Output message; class undefined vs. class not found
 
Oh, they scroll. Stupid Mac; doesn't make scrollbars obvious.
 
CREATE TABLE PeopleIveHadSexWith ( name VARCHAR(128) );
BEGIN
  head: LOOP
    INSERT INTO PeopleIveHadSexWith(name) VALUES('Your mum');
    SET p1 = p1 + 1;
    IF p1 < 1000 THEN
      ITERATE head;
    END IF;
    LEAVE head;
  END LOOP head;
END
@JoeWatkins ^
 
3:43 PM
LOL
 
excellent :P
 
You didn't use LM?
 
@DaveRandom USE `Lusitanian`;
 
user895378
@Fabien +1 for LM reference.
 
3:50 PM
yay .. the project already has 38 tables .. and there will be even more
 
@tereško aaand, no relations ? (:
 
relations all over
 
Implicit or FK'd?
 
but the project "estimates" that were given to me were "2 month"
 
@PeeHaa lol you didn't have to make a comment letting people know how to still see his DB credentials :P
 
3:51 PM
@DanLugg I designed that DB =P
 
I can't make @phpnwConf this year so I'm giving my ticket away to a retweeter who takes @funkatron's #osmi survey: http://bit.ly/1rCmvvt
 
tables count has nothing to do with design complexity
 
@AlmaDo Well, it can.
 
@JoeWatkins @salathe
 
@Fabien Sure I had to :)
 
3:53 PM
yeah @salathe ^ that ...
 
@DanLugg okay.. create table t0 (id int); create table t1 (id int); ... ; create table t37 (id int);
:-p
 
@AlmaDo can ;-)
Thanks @ircmaxell but apparently someone screwed the DB. Well, i guess someone has a bad definition over helping. — Darkkz 32 secs ago
^^ Poor soul.
 
heh
One day we all forget to add WHERE to our UPDATE ..
 
I also flagged it for moderators, but too slow
 
But.. guys. Do you believe in mystics & magic? (:
 
3:57 PM
unicorns are magical
 
Ugh.
 
Well, I believe in magic of number "666" :p For some reason.
Reason is - my most epic DB screwup
I still remember that (because of id was really 666)
 
Just got a rando call from @zend trying to sell me a ticket to @zendcon. "Oh, you're marketing to me. No, honey, no... *click*"
ha
 
Dear Room 11,
I have already asked many of you to upvote my answer on this question:
110
Q: PHP/MYSQL using an array in WHERE clause

Quinngiven an array $galleries = array ( [0] => 1 [1] => 2 [2] => 5 ) I want to have a sql query that uses the values of the array in its WHERE clause like: SELECT * FROM galleries WHERE id = //values of array $galleries... eg. (1 || 2 || 5) // ...

 

« first day (1412 days earlier)      last day (3540 days later) »