« first day (1203 days earlier)      last day (3971 days later) » 

16:04
hello everyone.
hi @AbdulRauf
user895378
@Fabien I got to see Starry Night a few years ago in person when it was on-loan at the High Museum of Art in Atlanta. Pretty cool.
You bitches know what time it is right?
it's always Beer O'Clock
:) @ircmaxell
16:17
though seriously, it's lunch time. BRB =P
@rdlowrey That's awesome. It's probably one of the only paintings I have any affinity for.
@reikyoushin Look at the dislikes on this video
user895378
@ircmaxell lol, says guy enjoying last day on the job. You should probably already be hammered :)
user895378
And yes. I realize it's only 11:30 in the morning in New York.
I was already hammered yesterday
user895378
16:24
Ah ... the slow-burn method. Very nice.
and I still have to sign my exit paperwork, to get a very large check. I don't want to be too drunk to do that :-P
16:45
I wish getting more money when you leave was a thing in the UK :(
I wish getting more money.
Was a thing.
Always.
we all do
well, most of us anyway
I don't want much more. Just like, 1/3 more of what I'm making already.
Maybe 1/2.
Bargain and negotiate then.
Also, side projects.
I'll have to move jobs.
Yea, side projects are what I'm going to start aiming for in the spring.
E_NOT_ENOUGH_SAFETY_DANCE
user895378
lol, this person doesn't realize he picked the wrong person to throw HTTP arguments against.
Stop vsiting the mental institution man...
Ip Man <3
The beer made me hungry.
later room!
16:57
Bye BeerHaa
hm.. when I see that Rebecca's "Friday" is starred, I'm realizing what the true respect is. So, respect is - when you're posting something and people star that, while in normal situation that would be moved to /bin
wat.
Reverse smilies creep me out.
17:01
(:arg)
If :D is very happy, is harelip happy?
@ircmaxell :Œ /* sad face drooling with disgust */
While it doesn't affect me, I wouldn't mind if variable variables began throwing notices.
user895378
> It's a little bit harder to read until you get used to it, but because it's DRY it's much easier to manage over time.
my response to that (that I just posted):
> Many a great evil in programs have been done in the name of DRY. DRY != easier to manage. Clean coding with a focus on readability improve maintainability in the long term. Hacks to save a few characters of writing at the expense of cognitive load do not.
17:14
When do you start at the new place @ircmaxell? If you're allowed to say.
Monday, the 10th
so 1 week off :-)
Nice, any plans?
going to Miami for @sunshinephp
I had no idea that, when using the gd lib through PHP, you could do something as awesome as this
The concrete jungle
17:15
Yup, GD can do anything, the math is up to you
Hi
what delimiter would be good for separating french phrases?
or any international text for that matter
@Lukas How about a regex word boundary?
You can also explode() on spaces... that'd be a word boundary...
I have "this is phrase one" and "this is phrase two" and I need to join them into something like "this is phrase one | this is phrase two"
but I don't want to use | as the delimiter
Use anything unique. Doesn't have to be a single character
could you please give me an example?
@Fabien ah yeah, I see
17:29
'Hello [ehfY&*£T&GDFh] Bonjour'
thanks
Why not just use csv but replace the newlines in the phrases with <br/> or something (assuming the phrases contain newlines). then you can use the *csv functions when dealing with it, escaping will happen transparently.
@Orangepill so let's say I just used the default "," for the delimiter, I should be able to just escape all the "," in the actual phrases, right?
17:41
@Lukas Yep.
ok that's great
thanks
@Lukas only thing that may be a problem is php's lack of a str_putcsv function ... but there are userland alternatives to that.
if you are serializing to a file it's as simple as using fgetcsv/fputcsv
18:03
Is it impossible, given the current state of the PHP lexer/parser, to accommodate the new operator applied to the return value of a function? Such that: function getClassName() { return 'ClassName'; } $c = new (getClassName());
I'm guessing there'd be all too much ambiguity.
@DanLugg There's no ambiguity, the people writing the parser and/or the parser are just stupid.
Well, seeing as class A { } function A { } is valid, then new A() becomes ambiguous.
 $c = (new ReflectionClass( getClassName() ))->newInstance();
^^ works.
True, but not particularly succinct.
True, but PHP isn't really succinct.
18:08
True, but it should be.
True, but i can't help but think this guy looks a bit like someone i know..
True, but you broke the "True, but ..." fixed the pattern.
True, but is ^^ this better?
True, but. Uh. *cough*
True, but I couldn't help it.
True, but @Charles's ping to me screwed it up anyway.
18:14
True, but thankfully the edit window was still wide enough.
True, but we can't take these chances.
True, but it's at that poor gentleman's misfortune, which that bike is giving him plenty of.
user895378
while (TRUE) { break; }
have i missed discussion on pt.stackoverflow.com?
18:21
@rdlowrey True, but that leaves me wondering how many other people do the all-caps boolean thing.
@CarrieKendall E_PARSE_ERROR_TRUE_BUT_NOT_FOUND
user895378
True, but I can't stop laughing now to respond.
@Charles wat

while (!$rdlowery) ;

17 mins ago, 13 minutes total – 14 messages, 4 users, 0 stars

Bookmarked 4 secs ago by Dan Lugg

Aw fuck, I messed up your name...
user895378
Dang it!
18:32
@CarrieKendall Sorry, we had a little spree of insanity going on there.
@CarrieKendall Anyway, there was some discussion of the HUEHUEHUE site the other day, mostly jokingly and with some wish that it was another language first.
sorry for disrupting ;]
HUEHUEHUE is Portugese for Portugese?
Brazillian online gamers tend to be very cliqueish as a stereotype.
lol, I'm familiar with HUEHUEHUE
oh good.
18:50
i am using a initialization vector with mcrypt_create_iv(16,MCRYPT_RAND); but this would change everytime a new request is made. is it possible to change it after 24 hours?
10 more minutes of employment
@blackbee you want it to change ever request
@ircmaxell party hard!
@ircmaxell nice :)
that's the entire point of an IV. It randomizes every single thing that's encrypted
i am using this iv as a key to encrypt and decrypt messages..but now it seems i am doing it wrong..
18:54
yeah...
use a stored key, and generate an IV at random for each message you're going to encrypt
either that or generate a child-key for each message
9
Q: Deriving Keys for Symmetric Encryption and Authentication

ircmaxellSo here's the concept. Rather than storing 2 keys and using a random IV, which presents its own problems (key rotation, ensuring no key is used in more than 2^32 cycles, sharing the keys, etc), is it OK to derive the cipher key, authentication key and IV from a master key? It wouldn't stop the ne...

i am not getting one point. one iv is used to encrypt one message, now for the next message the iv changes, then how would the previous message that needs to be displayed on the console be decrypted? because the iv has already changed
See also:
14
Q: Forced into using a static IV (AES)

MantorokWe've had to extend our website to communicate user credentials to a suppliers website (in the query string) using AES with a 256-bit key, however they are using a static IV when decrypting the information. I've advised that the IV should not be static and that it is not in our standards to do t...

@blackbee Hint: If your algorithm requires the same IV to be used for encryption and decryption, and you need to change the IV with every message, where should you store the IV?
in the database . like ..
userid|messageid | message | iv ??
@ircmaxell or @Nikic can you please check whether my message to internals is actually at internals? I dont see it on the web interface
@blackbee Probably.
19:05
but if the database gets in the wrong hands then everything is gone..
@blackbee The IV isn't the private key. The key's not in the database, is it?
no key is not in the database .. but in that case the key has to be static..
That may well be fine. Keep in mind that if someone's on your server anyway, you're already screwed.
They'll have the keys, the code, and the database.
eww...
this is my first effort on using java for client side and php on server side.. without any framework .. (although i havenot used any framework before)
i think if i am able to code @ircmaxell 's solution i will be less screwed
Does a lookup by primary key in mysql degrade as the number of records increase or is it pretty constant?
19:18
hi im so desperate :(
for(){
$var += strtptime('date here H:i:s')
}

i like to sum my time after loop could anyone help me please
nevermind .... dumb question
sum up what time?
yes sir
ah ok. so there it is: news.php.net/php.internals/71886
@salathe was that formally correct this way?
Can I tweet about it now?
heh, where is people nowadays? Drinking?
@Gordon Friday friday friday.
@Danack yeah, all out to honor Rebecca
19:32
@kodewrecker This should give you the sum of your times:
<?php
$times = ["00:10:12", "01:15:23", "02:22:22" ];
$today = strtotime(date("Y-m-d"));
$intervals = array_map(function($a) use ($today){ return strtotime($a) - $today;}, $times);
echo array_sum($intervals)." Seconds";
$sql2= "SELECT password
FROM `users`
WHERE `username` = john";
isee thanks for this sir @Orangepill
$var=$this->db->query($sql2);
i want to use password through var? how can i do it?
pls help me
@John 'john' should be in single quotes in your query
and I'm assuming $this->db is a PDO instance?
19:35
Has anybody more experience with redis (than me)?. I'm searching for a way to detect which databases are currently in use or could be given to an deployed application. There are 100+ applications possibly on that server. They could be created or deleted dynamically. It's a staging server
(good morning) :)
no its not a PDO instance
I am using codeigniter framework
Voting for Automatic Property Initialization in PHP has started: https://wiki.php.net/rfc/automatic_property_initialization
@John Well I'm not familiar with codeigniter but I'm assuming $var is a result object... not just your password
If an application gets staged, I need to decide which redis database is "free"
(sorry for going on your nerves :)
@Orangepill yeah its object....but i dnt know how to deal with it..i want that password out of that in a variable
19:39
@Orangepill it's working you save my day thanks big help sir
@John According to the docs you get an array of objects.
@MadaraUchiha thanks
if ($var){
    $password = $var[0]->password;
}
@Gordon good luck!
19:42
@BenjaminGruenbaum thanks. i expect it to get shot down but let's see
I'm in favor but alas I have no karma
user895378
@Gordon Unless someone raises real concerns I'll be in favor. I suspect there might be some sticks-in-the-mud who don't want it.
@rdlowrey there is already one
user895378
Yeah, I saw :)
Why can't we have nice things
19:45
@rdlowrey yeah, there will always be sticks in the mud :)
@Orangepill write a php preprocessor.
@orangepill I got this error Fatal error: Cannot use object of type CI_DB_mysql_result as array in C:\xampp\htdocs\Testing\CI\application\models\mymodel.php on line 25
user895378
I wouldn't be okay with the plain function __construct($x, $y); because I believe that's too magical. But with $this-> required I don't see any problem with it. It should be perfectly clear to people what's going on there ...
@John so the docs are lying...it's not an array its a traversable object... there should be an alternative query method that is intended to only return one result
@John $query = $this->db->query("YOUR QUERY");

if ($query->num_rows() > 0)
{
$row = $query->row();

echo $row->title;
echo $row->name;
echo $row->body;
}
19:48
if ($var){
    $password = $var->row()->password;
}
@rdlowrey I might like @ for this-> shorthand. Then again I'm not a big php user.
@John I would recommend you try this new thing called "reading docs"
user895378
@BenjaminGruenbaum It would be nice but @ already has a well-defined purpose in PHP ... and that purpose is breaking everything :)
@rdlowrey it doesn't break anything.... it helps you ignore the fact that it's broken :)
user895378
19:50
True: it only pretends nothing broke :)
@rdlowrey that purpose should be deprecated and removed anyway :D
Does anyone have a resource to help estimate the number of request/hour a server can handle...
@BenjaminGruenbaum There are a very few cases where @ is somewhat acceptable.
@MadaraUchiha name one?
@(include 'everything.php')
^^ errors, be GONE!
19:54
like processing html with the DomDocument
@BenjaminGruenbaum DOMDocument::loadHTML from an external website.
@MadaraUchiha how is that acceptable?
It'll raise a warning for every single HTML parse error.
@MadaraUchiha can't you catch it?
@Orangepill man ab or sudo apt-get install siege
19:55
@BenjaminGruenbaum Not trivially, no.
@MadaraUchiha you can't watch warnings in php?
As in, if you don't do @ it'll echo to the screen ?
PHP error handling sucks.
Bad.
@BenjaminGruenbaum There are ways around it
LMFAO, this is hilarious. Why would anyone think this is a good idea?
19:55
you could also do libxml_use_internal_errors(true);
You can disable warnings altogether with error_reporting
^^ Also bad.
@MadaraUchiha that's even worse.
You could use the arcane incantation @Orangepill just posted
Warnings sound horrible :/
19:56
Or you could use @ to suppress the warnings from the statement.
Which is my preferred course of action in this case.
Ew.
Why can't you catch them?
@BenjaminGruenbaum I like warnings because they enforce your code to be well written (i.e. if you have warnings in your code, your code sucks).
hola ya'll
But sometimes they simply make no sense.
@BenjaminGruenbaum Only Exceptions can be catched.
@BenjaminGruenbaum because PHP has consistency issues.
19:58
In Java, also null :P
convert all the things to exceptions
@BenjaminGruenbaum I remember a library that converted all errors of all types to catchable Exceptions.
The downside is that it makes everything fatal if not catched.
@MadaraUchiha how is that a downside :S?
Also, it doesn't work for syntax errors for obvious reasons, and IIRC fatals still kill the script regardless.
Why would your script have syntax errors and continue normally?
19:59
it wouldn't
@BenjaminGruenbaum It wouldn't.
I think you can make recoverable fatal errors throw
Syntax errors are always, 100% fatal.
I see the appeal of warnings, but it should be done using a code quality tool and not echo to the screen.
@BenjaminGruenbaum In production, you are supposed to disable error display.
Fatal errors = 500 Internal Server Error
Non-fatal warnings/notices = ignored.
20:00
I find "recoverable fatal" a oxymoron... either it's recoverable or its fatal... it can't be both
@MadaraUchiha So, you don't for instance - log them?
@BenjaminGruenbaum I didn't say that.
I keep error_log on at all times.
Both production and development
I have a script that removed the log every night in development.
Production logs are always kept.
Also, some people like to make custom 500 or other error pages that automatically emails/logs in a custom way.
Which is sometimes preferable because PHP's logging ability is very basic.
@Orangepill Should be "near fatal error", or perhaps "incapacitating error", or even "whatever-doesn't-kill-you-makes-you-stronger-but-this-fucked-you-up error"
@DanLugg FINISH HIM!!
@Gordon did it come through?
20:06
@MadaraUchiha lol, exactly.
@ircmaxell yes, but only on second try. I hate newsgroups :)
yup, it came through
E_SCRIPT_INJURED
@ircmaxell thanks for checking
20:08
e'nin
recoverable fatal error
user895378
@BenjaminGruenbaum My personal favorite @ WTF is when I call stream_socket_accept() to accept a new socket client and get E_WARNING: Success! :)
user895378
I should probably go in and fix that one now that I think about it ...
hilarious maybe nsfw
well I'm out ... have a good day guys
user895378
@Orangepill later. And thanks for the link OMFG laughing.
user895378
20:15
and yes, it's maybe nsfw
20:28
@ircmaxell how come? you gonna start consulting now?
@rdlowrey yep
nope, laid off
@ircmaxell interesting. what happened? you wanna tell?
team was shut down, I was given 2.5 months notice
@ircmaxell come work with me in munich then :D
20:36
nah, starting a new job in 1 week :-)
where and what role?
user895378
Is there any reason to favor zval_is_true() over zend_is_true()? Looking at the source they seem to be doing the same thing. @ircmaxell or @NikiC can either of you comment on that?
@Gordon not public yet
@rdlowrey one is engine specific, one is not...
user895378
ah, I getchya.
@ircmaxell ok. very curious what you picked. I'll find out next week then :)
20:40
@Gordon Going to work at a company doing personal sites using Wordpress for small businesses. Using shared hosting. PHP 5.2 and all the fun.
:D
@BenjaminGruenbaum yeehaa
@rdlowrey I think zval_is_true is in-place. I'd use zend_is_true
@Gordon :-)
user895378
@NikiC Thanks.
@BenjaminGruenbaum Living on the edge, I see?
20:48
@MadaraUchiha Aye, it's the only way @ircmaxell knows.
@ircmaxell If I have to guess I guess FB or Google
@BenjaminGruenbaum yyyeeeeaaaaahhhh, and as the signing bonus, they are buying me the bullet
@Gordon interesting that you would say that... I am curious, why?
@ircmaxell With an engraving of your name on it too :D
@ircmaxell Large companies have more research positions. Facebook and Google both have research divisions and work with php.
@BenjaminGruenbaum And you think I'd be professionally qualified for such a position? Interesting...
20:50
@ircmaxell because good knowledgable people, interesting tech environment and challenges plus the perks of working in a g or fb office
@ircmaxell more than several people I know in similar positions.
I have no idea what your 'formal' education is, but in terms of knowledge you'd qualify.
@BenjaminGruenbaum Well, Facebook uses "PHP", and Google AFAIK don't use PHP that much...
@Gordon Interesting. I will say that you're not far from the truth... Not far at all actually :-)
Also, they've been working very hard on manning these positions, at least in Israel.
@BenjaminGruenbaum not much... I have an Associates (2 year) degree in Math
@BenjaminGruenbaum and Thank you very much. I am honestly flattered
20:52
No problem, just my opinion, knowing and working with some of those people.
@ircmaxell I'll find out soon enough :)
You learn a lot on during, basically you learn a lot by reading lots of scientific research. Microsoft Research works like this basically and they're pretty great.
@Gordon yes, you will :-)
@BenjaminGruenbaum thank you. Honestly.
user895378
@ircmaxell I have my guess from our conversation over the holiday -- I'm looking forward to finding out whether or not it's correct. In either case, congratulations on taking the next step in your personal and professional development!
20:57
It's hard judging between imposter syndrome and drunning-kruger, and trying to balance those is difficult. I don't want to seem over-confident or cocky, but at the same token be able to do it... It's a significant challenge, at least for me
@ircmaxell if its FB I want to know everything about the bootcamp
user895378
If it's Microsoft one of my best friends from college works for them in Seattle and you'll need to meet.
@ircmaxell it's a significant challenge for everyone.
@ircmaxell congrats ;]
I'll start working on shit as a framework and shit as a service - coining SaaF and redefining SaaS
thanks!
i am pretty jealous, if i'm assuming correctly
21:27
Yeah, same approach :P
There's also an "MVC" section in that article
@Teresko would be so proud <3
Experiencing problems installing PHP-FPM any suggestions?
0
Q: Installing PHP-FPM with Apache on Amazon EC2 – Not such file or directory / Incomplete Headers

panoramicAfter dealing with performance issues with my website I’ve decided with modify my server configuration. I am in the midst of changing from the Apache 2.0 Handler server API to FPM/FastCGI, but have encountered problems along the way. Admittedly, I am essentially clueless in this area and have be...

@panoramic It looks like apache is trying to connect to "/usr/lib/cgi-bin/php5-fcgi" as a socket, expecting PHP-fpm to be there, but the socket appears to be /tmp/php5-fpm.sock .
21:38
@Danack Ahhh. If that is the case I should change my /etc/php-fpm.d/www.conf file to listen to /usr/lib/cgi-bin/php-fcgi.sock instead?
Is (x % y) always equivalent to (x & (y - 1)) where x > 0, y > 0?
how long would I have to wait for php 5.7?
@panoramic Or the other way round yes - tbh both directories are kind of weird places to have the socket. I think something like /var/run/php-fpm/webservername.sock is 'more standard' - but tbh it doesn't really matter.
@MadaraUchiha well, I guess if I really opened the voting too late for an inclusion in 5.6 then I need to know
21:41
@Denack Awesome! I'll give it a shot and see what happens.
so long as they're consistent.
http://news.php.net/php.internals/71748 "> IIRC, any RFC that is included in 5.6 should be approved by Feb, 22.
> I would like to see this change in 5.6, so don't be late."
I'm out, later
@Gordon BETA-1 is feature complete, so as long as the RFC and patch are in by then, you're fine.
that's the rule that was used for 5.5, so should be consistent
@ircmaxell @rdlowrey so news.php.net/php.internals/71895 is wrong? I am not familiar with the current release process
@Gordon I need your help.
@mAsT3RpEE with what?
user895378
21:50
@Gordon As far as I know you're perfectly within the current rules for the RFC process. Is it ideal to add things in the alpha stage? Probably not. But FWIW I'm doing the same thing.
user895378
As long as the vote completes prior to Feb 22 (I think that's the cutoff)
@Gordon I read your comment on singletons being used for wrong porpose etc. I'm building a library and i use them a lot. My library deals with a lot of serialization of objects and passing them around. I use singleton pattern to make sure there is only one instance and to allow an object to be instantiated anywhere.
@Gordon Do you agree or do you have a magic voodooo alternative.
user895378
You can insure a single instance without making your code untestable by using the problematic Singleton pattern.
@mAsT3RpEE I'd ask "why" first
@mAsT3RpEE If the answer is Singleton, the question is wrong.
user895378
21:52
@mAsT3RpEE Read this
the answer is simple really. i read a book. book says singleton ... blah .. blah
@mAsT3RpEE "My library deals with a lot of serialization of objects and passing them around. " well, why would that warrant enforcing a single instance with global access?
@mAsT3RpEE Do you know why global state is not good?
still reading.
@mAsT3RpEE btw, which comment do you refer to? real comment or stackoverflow.com/questions/4595964/who-needs-singletons/…
21:56
> I agree that obsolete protocol should be deprecated. However, removal is totally different. I would like to have long period before removing any feature from PHP whenever it is possible. It could be used as toy for security experiments as well as for incredibly old internal servers never updated. Perhaps, remove them for PHP 7 or even 8?
@rdlowrey lol, I wonder when this stupid stability madness will end
looks like everyone is still running windows XP and RHEL 3 from PHP internals...
user895378
@Ocramius yeah, I'm writing the appropriate response as we speak.
never mind. let me give you my problem in full. imagine an object like an authentication object. it is created and added to the session. only one instance should be created. this should be hardcoded. it should be accesses globally since it is a part of an api. different pages interact with it. adding / removing / modifying it.

What's the best way according to you. and it must be simple enough for someone with only 1years experience in php after all its a library. that's my question i think.

« first day (1203 days earlier)      last day (3971 days later) »