« first day (1011 days earlier)      last day (4163 days later) » 

22:00
@PeeHaa well then I suppose nice land was something of a weekend vacation
@Suavelizard If only it was weekend ;)
@PeeHaa Hahahaha
I just perused the transcript: "HURR DURR IM A GRL!!1one!"
:-)
I'm going to guess 16 - 18, Caucasian, upper-lower-middle class, and can be summarized with "OMG I PLAY ANGREE BURDS, IM SUCH A GEEK! BUTTERCUPS!"
Well, I've had enough of the office.
Eff this herblederpin, I'm going home. Later folks.
22:10
@Bracketworks Watch out for the tractor!
Hi. I create todays YYYY-mm-dd 00:00:00 format by this code:
$today = new DateTime();
$today = new DateTime($today->format('Y-m-d'));
Is there an easier to read solution?
@salathe ?
@Bracketworks I'm just hoping you don't get hit by a tractor :)
@salathe lol errata: "don't"
Be careful!
@salathe Has.. has there been widespread tractor related accidents?
I'm afraid to go outside now.
@Bracketworks I had a premonition…
@salathe I call shenanigans.
There's no such thing as tractors.
@Bracketworks Imagine if you did get hit by a tractor on your way home!
22:18
@salathe Depending on the extent of injury, the first thing I would do is come on here and thank you.
@DaveRandom this smells like using trim. Instead check for input encoding (e..g UTF-8) and (regardless if UTF-8 or ASCII), exclude control characters. See Building Scalable Web Sites by Cal Henderson page 98ff and related.
Blarg. Night.
@Bracketworks You'll be okay now that I've warned you. G'night. :)
@totymedli is that too hard to read?
@totymedli $today = new Datetime(date("Y-m-d 00:00:00"));
@tereško questions with no answers and zero upvotes will get automatically deleted. no need to garden after them.
22:23
k
(I just write that as it's likely that the OP won't care to re-open)
@bwoebi $today = new DateTime('today');
I find strtotime a better sounding function name :D
but it's not giving a DateTime back :/
@hakre it would be a terrible class name
@salathe yeah, does not work as classname.
22:25
I never cared much about DateTime… date functions are enough…
You can always use date_create('today') (but it's no strtotime)
@bwoebi You've never worked with dates billions of years in the future?!!
@salathe no ;-P (there's no need to)
these alternative OOP methods are sometimes just too hip and modern
@bwoebi well, some part of it goes beyond UNIX timestamp, but not much.
It's just giving you a better interface.
@hakre 64 bit unix timestamp is enough. I don't see any need for more.
@hakre I don't know if it's better…
22:32
I think DateTime::createFromFormat() justifies the whole existence of the class. :)
@salathe yes. this is the only advantage. But I'd prefer just timeFromFormat() as a function
now i recall why this user was in the ignore list
@bwoebi You mean, unixTimestampFromFormat() ?
@salathe basically yes, just this name would be too verbose & long
hmm ... someone blew the valve in c++ room (for 10k+ users only)
@hakre this should be added to the wiki entry on "overkill"
@tereško well, the bounty is more of an educational amount, isn't it?
@hakre this always reminds me of Dr.Who episode, which explored a society where daleks had turned from a past enemy into a pop icon ... and people had forgotten the point of it all
@tereško well, I beg to differ.
22:52
I'm not sure if begging will help with this
(also, I'm assuming you know what daleks are)
@tereško you're pointing to a pop reference. not always useful.
farking hell - I hate things that pretend to be arrays but aren't. Does 'array_key_exist' call anything like php.net/manual/en/class.arrayaccess.php or does it only work for isset() ?
array_key_exists expects an array - not an object.
so to answer your question: only (tm) for isset.
Hi to all. How can I get folder name as category and filename with php? Folder structure is like that:

https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-prn2/v/1079136_10201040483027725_1118070792_n.jpg?oh=e82ce679ac3bb278c90b6e500e33e32a&oe=51F0892D&__gda__=1374740895_bdfdf08ada8224a0dca1b9841721a481
or is it possible?
@Someone pathinfo
23:02
@hakre could you show me based on sample?
@hakre yeah - but
$testArray['yolo'] = null;
isset($testArray['yolo']) == false
@Someone didn't I link that?
For the record - it's not my code. https://github.com/guzzle/guzzle/blob/master/src/Guzzle/Plugin/Oauth/OauthPlugin.php#L73
Thing on the right that looks like an array isn't it's a 'Collection' class.
@Danack you normally don't use NULL unless you want to unset something.
That's true for me, but there's crazy bastards out there.
23:04
@Danack github.com/guzzle/guzzle/blob/master/src/Guzzle/Plugin/Oauth/… - it's missing the concrete type here in the constructor, that's the problem.
the phpdoc @param is lying. It must be mixed not array. open a bugreport.
Fatal error: require_once(): Failed opening required '/.../includes/databases/$db.php'
also telling that an array has parameters sounds like pretty much wrong language.
No, but I had a feel that there must be an easier way. And there is:
new DateTime('today');
Yep. The whole 'disguising a class as an array' seems to be a Bad Thing.
problem was introduced here: github.com/guzzle/guzzle/commit/…
23:09
@bwoebi new DateTime('today'); is much better:D
@hakre @hakre thanks for the link. But problem here is that for pathinfo() I don't know direct path. Because as you see from the image second folder name (i.e. funny or tragedy) is changeable. I don't know what to write as direct path for the function.
@Someone well, there's a path separator, right? You either count from beginng or from back. That's a simple string operation (maybe exploding to array): explode
@Danack I dunno if that dev is fully to blame, because he didn't introduce that "Colelction" class. Naming a class "Collection" most often is a smell btw.
Not that I didn't made that mistake in the past roll eyes :D
well in defence of doctrine, doctrine is about data-structures, not something concrete like HTTP requests.
@hakre could you please write sample php code. Sorry I am beginner at php :(
23:13
@Someone well, beginning is always hard. I normally give links to manual that has example code already.
@hakre ok thank you :(
also I mean you put things together like first pathinfo and then explode on the dirname part for example.
@hakre, to be honest it seems me so abstract. Anyway I will try. Thanks though.
@Someone solving problems with code always has a certain level of abstraction. Actually abstraction is a way of solving problems. Which also is part of programming.
Anyway, got to jump in the bed.
gn8 @all.
Thanks @hakre I did not know that.
23:28
nn hakre
goodnight
23:47
@hakre Sorry, just run that past me again?
Also, I just discovered that DOMDocument won't release its memory until the script terminates, even if you burn all references to it (in 5.4 at least). Anyone come across this before/got a solution? There are a couple of questions relating to it but no solutions :-(
user895378
@DaveRandom Really? That sucks if it's an accurate statement (I can neither confirm nor refute it).
@rdlowrey I'm dealing with a 37MB XML doc, it uses around 175MB RAM, I extract some data from it, I burn all references to the obj and then go and do some other stuff that takes a while, memory usage doesn't drop until the script terminates
I can't profile it at the moment but I'm 99.9% certain it's DOM that's to blame, since it shoots up while the file is loading and then stays pretty stable for the rest of the execution
user895378
@DaveRandom That really sucks. If you get a reproducible test script post a link and I'll play with it too. I have some things I want to do inside long-running scripts that would be quite negatively affected by this.
@rdlowrey this is a lot of work this gateway pattern… (first time I do it)… and about 35%-45% of the time it wasn't coding, but thinking how to do it…

« first day (1011 days earlier)      last day (4163 days later) »