« first day (723 days earlier)      last day (4218 days later) » 

Sem
12:00 PM
@DaveRandom What about making a realtime php multiplayer notepad? That would be fun :)
 
@Sem It already exists.
It's called IRC.
 
0
A: Record the Logout time of user in case of Session timeout and Browser Close

ChampOne less resource using and also less relaying process can be use browser beforeunload event. Send the ajax request to the server on browser beforeunload event and make the insert of user logout time. A nice answer by SLAKS on Browser window close event** is The beforeunload event fires whe...

 
@AdityaKumar Stop spamming this room with your question
 
Sem
@MadaraUchiha I mean with executing possibilities :D
 
@Sem What do you mean by that?
@AdityaKumar You've already got answers on that question
 
Sem
12:03 PM
@MadaraUchiha realtime Multiplayer PHP application development B)
 
@Sem Oh goody, what could possibly go wrong?
 
@MadaraUchiha i am sorry , if i am spamming , but my only concern is to get the problem solved by reaching to some genuine intelligent mind.
 
@AdityaKumar You already have answers on that question
Some of them are upvoted
 
@MadaraUchiha one of them is upvoted, but that still not the perfect way to do it. their should be some way to solve this out.
 
@AdityaKumar There isn't a clean way.
The second answer may be of more use
 
Sem
12:08 PM
@AdityaKumar You're just waiting for a copy paste miracle aren't you?
 
But don't expect a magic solution, because there is none.
 
@Sem not exactly , but yes some genuine path to follow.
 
@all Hi
 
@Leigh Did you go see the Smarty talk? Anything in it that might persuade me that it's worth using? Also did you go see the React talk, and if so was there anything in it other than "this is why event-driven architectures are a good idea"?
 
12:23 PM
@DaveRandom What smarty talk?
 
Sem
@AdityaKumar Why do you copy the answer of @MadaraUchiha in hope for some upvotes in the mentioned question?
 
@DaveRandom There was a Twig talk, which, no I did not attend
 
@Leigh That's what I meant. I view them as one and the same because I think both of them are stupid.
 
@DaveRandom and the React talk was good, it was basically to dispel the myth that node.js is de-facto for event driven server apps
 
4
A: Remove specific elements from an array PHP

BabaYou can use array_diff $input = array("red", "green", "blue", "yellow", "red", "yellow", "blue"); $remove = array("red", "blue"); var_dump(array_diff($input,$remove)); Output array 1 => string 'green' (length=5) 3 => string 'yellow' (length=6) 5 => string 'yellow' (length=6) ...

When I write the first and correct answer
And some other smart-ass gets accepted
 
12:26 PM
@DaveRandom This years talks are not up yet, but you'll be able to watch them all @ blip.tv/phpnw
 
@Leigh Nice one, cheers.
@MadaraUchiha Exact dupe anyway
 
Exercise your delete votes, and deny him his ill-gotten reputation!
 
Jon Skeet wanted to find out if he can get so much rep without being Jon Skeet, so he opened a new account.
 
12:41 PM
Hello all
 
Does anyone here have Lion OS X running the imap extension for PHP?
 
Yes, and No
 
@Gordon Nooooooez No deletz plz
:P
 
@MadaraUchiha oh, didnt see you repwhored on that, too
 
12:49 PM
=)
 
Does anyone here disagree that should be a synonym of ?
 
No, I do not.
 
@Leigh No, I agree.
But we can't propose it, only a moderator can create those
 
I was considering pinging one
 
Open a meta question on it
 
12:57 PM
Example: stackoverflow.com/questions/12781422/why-is-stdclass-namespaced - tagged php5, not php. I don't watch php5 specifically, and I doubt most people do
 
tldr: has been proposed and shot down before
 
Yeah, reading that one now
 
WTF @ NullUserExceptions PHP5 != PHP, what the hell does he think it is
 
Heh apparently adding [tag:php*] to your watch list is the way to go, because non-php-aware mods will decline the synonym based on heresay
 
1:16 PM
Where can I find symphony's router source code?
 
1:33 PM
@Leigh Surely if we can get an e-petition or something with enough names on it it would be considered? Especially if @TimPost gets involved (assuming he agrees), surely they have to consider the opinion of a another mod who spends his SO life in PHP-land.
 
Hey guys can you help me with a php twitter oauth code?
 
OT, but any of the Steam users in here know whether it's possible to unlock games before release day when they are already preloaded?
 
2:01 PM
@Gordon hack it, baby :)
but I bet those aren't completely pre-loaded.
 
@hakre i found a few posts that claim it works but they want you to download some shady exe files, so yeah maybe it doesnt work at all
 
just FYI: meta.stackoverflow.com/questions/149743/… - I think that is a dupe on meta, related to the new reference question.
 
@Gordon Hmm, I can't remember the game, but I'm pretty sure there was one that was able to be downloaded, but wouldn't launch until release day
But it depended on servers being up to play it
so they just kept the servers down
 
@Leigh i'm waiting for XCom to release
 
2:07 PM
Oh right, you have it preloaded, and you want to play ;)
well I'm pretty sure, on release day you'll have a small download to enable it, nobody sensible would give you the full game that can be enabled with a reg setting or putting your clock forward :p
 
@hakre Correct.
@Gordon Not unless you have the remaining parts of the game...
 
yeah, probably true. anyways. let's hope good things come to those who wait
 
When does it release?
 
12th iirc
 
@Gordon I don't suppose you're a fan of Company of Heroes?
 
2:14 PM
@Christian CoH is probably the only RTS I ever seriously played and liked
@Christian but I couldn't bother to preorder CoH2
 
@Gordon Well, then I guess you're in for the upgrade?
Why not?
 
@Christian what upgrade?
 
@Gordon Oh, it's a matter of talk. I meant the new game, naturally.
 
@Christian mainly because I dont like to pay the full 50 bucks for games when I usually dont have the time to play them immediately
@Christian ah ok
 
@Gordon Oh, I've been stung pretty bad there with games like MoH.
I hope CoH won't let me down.
 
2:16 PM
I still have lots of unplayed games in my Library.
 
Looks like a 3rd person shooter
so, no good things, no matter how long you wait
 
@Leigh XCom? No, it's turn based strategy
 
Im at work so just watching the videos
 
kinda like Jagged Alliance back then
 
and fast forwarding over people talking who I can't hear
I just see soldiers shooting stuff
 
2:19 PM
@Leigh I only played the demo which felt okay. its turn based, you got rpg elements and it played like it could interest me enough to invest the preorder into it. then again, it's a 2k game and after the huge letdown Mafia 2 and Civ5 was I didnt want to buy another 2k game
 
@Gordon heh, if you pre-order xcom, you get civ 5 free
 
but its giftable, so you can send it to a friend
 
2:24 PM
@Leigh i know, i gave it to @edorian because i already owned it
 
:)
I missed his talk at PHPNW
 
@Leigh which one was it? state of phpunit?
 
Yea
 
ah, i think there is slides for that somewhere
 
2:25 PM
My eyesight is terrible, I did look for his namebadge on all the long haired guys at the bar to say "hi". but didn't see him
 
i havent seen it yet either. I just know it's a huge list of things
 
@TimPost Why, if it isn't the blue guy. How are you doing? :)
 
user50049
@Leigh You'll definitely need to open a meta discussion on that. I tend to agree because PHP4 is .. well .. dead.
 
@Leigh reminds me of Homeworld
 
2:31 PM
@Leigh reminds me of Shattered Horizon
(except the rts part)
 
I could never get into homeworld
 
Error Reference needs one more closevote again. Prepare to reopen
 
Can we get rid of all the questions tagged to help stem the spread of misinformation about it.
 
Reopen Error Reference please
 
Do I need more than 3k to reopen?
 
You don't need meta for a community driven clean-up of bad information, speculation, and complete innaccuracy
I've only asked for CV on some particularly bad ones, and DELV on ones that are already closed.
 
@Leigh yeah, but you need meta if you dont wanna do it alone ;)
 
Okay I'm having a really stressful problem >_<
 
I have review beta to help ;)
 
yeah and the discussion over there sucks. I mean it's nice to see some users making up their mind, but it's so much speculation I would not even know yet if all that is set in stone. I guess we see some open / reopen dance.
most users like to comment on the form and rules anyway. putting a question like "do we need this" or "should we forbid this". I wonder which style that is.
 
2:59 PM
I'm having trouble with this code..
$ban_date = get_Date('d/m/Y');
echo $ban_date." ";
echo date('d/m/Y', strtotime($ban_date));
the bit before the space is equal to
 
but I'm too involved anyway. I should give other users more time to make up their mind.
 
08/10/2012
BUT THEN
A wierd thing happens
(the second echo)
it outputs 10/08/2012
 
strtotime is not the answer to all datetime problems.
look for something called parse from format.
 
@JordanRichards have some desserts then. that will reverse the stressed situation
 
you can hint the format you have so that function knows exactly what to do and does not need to guess.
 
3:01 PM
Oh thanks! Could you give me an example?
 
@JordanRichards that is to be expected and documented in the PHP Manual
 
@JordanRichards Not only an example, also description and comments: date_parse_from_format
 
Urm
Why does it give an ARRAY?
I can't understand why it is swapping things...
my code should work fie
 
3 mins ago, by hakre
strtotime is not the answer to all datetime problems.
 
@JordanRichards no, it shouldn't. How is it supposed to know you mean d/m/Y and not m/d/Y?
 
3:04 PM
why is
08/10/2012 being messed to 10/08/2012, when the format has not changed or anything?
@Gordon because I have date(format here
on this line
echo date('d/m/Y', strtotime($ban_date));
 
@JordanRichards The problem is not date but strtotime you do not give a format to strtotime.
 
strtotime picks eu/us date depending on whether you use / or - (if i remember correctly)
 
> Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: if the separator is a slash (/), then the American m/d/y is assumed; whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed. To avoid potential ambiguity, it's best to use ISO 8601 (YYYY-MM-DD) dates or DateTime::createFromFormat() when possible.
 
There you go
 
^ yes exactly that.
 
Cheers! :)
 
It's terrible, because US date formats should never exist
 
Completely illogical
 
So how could I use php.net/manual/en/function.date-parse-from-format.php to what you said?
to match my case
to achieve it
 
3:07 PM
@JordanRichards well, what does it say how to use it?
 
It does not give me the timestamp I want
it just gives me an array
 
Speaking of date, how do you handle the i18n of date in php ?
Just use gettext on the format ?
 
@magnetik try the Intl extension though I cant recall whether it has methods for that. I think it does
 
@Gordon I was not aware of this, i'll take a look thanks :)
 
@JordanRichards array are just multiple values, you can use sprintf() to format them to your needs. But that is only one example.
 
3:09 PM
@Leigh They make sense in terms of how you might say them in English (January 1st 2012), but translating that into numeric representation is indeed ridiculous.
 
3
A: PHP date format converting

GordonAs of PHP5.3 you can use the DateTime API $dt = date_create_from_format('M d, Y', 'January 23, 2010'); echo date_timestamp_get($dt); or with OOP notation $dt = DateTime::createFromFormat('M d, Y', 'January 23, 2010'); echo $dt->getTimestamp(); Note that while DateTime is available in PHP...

 
ah :D cheers!
 
Post Locked by George Stocker♦ - occurred 16 mins ago
Notice added Content dispute by George Stocker♦ - occurred 16 mins ago
Post Closed as "not a real question" by Peter Smit, Repox, ruakh, Servy, meagar - occurred 25 mins ago
Looks like the person posting on meta has unlocked the own achievement award.
 
@hakre yeah, sucks
 
3:12 PM
@Gordon IT WORKED! :D
Thank you so much :)
 
@DaveRandom They don't make sense of how you might say them in English though (The first of January, 2012)
 
@JordanRichards you are welcome
 
@Gordon thanks :)
 
@magnetik you're welcome
 
@hakre What is that from?
 
3:14 PM
Are they really asking that we should create one canonical Q+A first, before we can link them on the reference?
 
I mean, we try that anyway, but is that the point? I think this is not about the form.
does it mean I need to place my own opinion on meta?
 
@hakre only relevant complain about the Form I see is that we are adding answers instead of linking to existing. We are effectively taking away from good existing questions, which is somewhat unfair. This is why the OP reference only links to existing questions. However, given that most of the existing error message q&a are low quality and too localized I dont think it's so severe here.
 
@Gordon In order to create a canonical most of the time you must merge several existing.
 
I think basically the same. I can say from my own subjective standpoint that in the beginning I did not thought about lengthier error-message description, more so a snappy, practical and small guidline per each error and then linking good questions.
 
3:18 PM
You can't really do that on a large scale without creating new ones
 
@hakre @Gordon et all, way to stir the pot with your reference question :)
 
@MikeB yes, a storm in the tea pot or how goes the saying.
 
@MikeB It was CW, and it's useful, I don't see the problem.
@hakre Tea cup :)
 
How would I ahcieve

$newdate = strtotime ( '+'.$amount.' day' , strtotime ( $date ) ) ;
$newdate = date($format, $newdate);

using http://php.net/manual/en/function.date-parse-from-format.php?
Anyone?
 
If that doesn't qualify as a proper CW post I don't know what does
 
3:22 PM
@MikeB what's CW?
 
276
Q: What are "Community Wiki" posts?

Justin StandardSome questions and answers are marked Community Wiki and are owned by a Community Wiki user. Why have Community Wiki posts? How do Community Wiki posts work? How does a post become a Community Wiki post? How can the Community Wiki status be removed from a post? Return to FAQ Index

 
Good afternoon
 
@ircmaxell Hello.
How would I add dates using date_parse_from_format?
 
@JordanRichards you cant. you add the amount of days to the dateTime object later. but frankly all of these questions can be easily answered by searching SO. there is like hundreds of these trivial dateTime related questions.
 
3:26 PM
Am I missing the point? Seems on Meta they think that this question itself is the close as dupe target. I thought the listed common problems were links to canonicals.
 
@Leigh in an ideal world people would pick a suitable dupe. in the real world, people will just close with the error reference. has been the same with the Operator reference.
 
Well that's a shame
Sad to say, in that case maybe it should be a tag wiki, to force people to link to the correct answer, instead of being able to link to the reference.
 
@Leigh not really. given that the people asking yet another Headers already sent question likely didnt bother to solve this on their own, it's fine to close their questions with the reference and have them find the solution in there. they were supposed to do that research prior to asking anyway
 
how goes it?
 
@ircmaxell Oh we're just dandy ;) Just another day in SO PHP land.
 
3:31 PM
also, closing with the reference will raise their awareness to that reference and they will hopefully remember to look into it next time they have another oh-so-hard-to-fix error
 
Still in Mankchester?
 
just arrived in Milan a short while ago
 
@ircmaxell despite having no visa you didnt need anyway ;)
 
Aha, more suitable weather for sure ;)
 
Nope, was an idiot at the checkin desk...
 
3:32 PM
@ircmaxell be careful in Milan with the prices. I paid 8 Euro for a Coke there
 
Dam!
 
lolwut
did it come in crystal glass or something ?
 
@ircmaxell Also, mind that you'll have to pay Coperto in most restaurants and cafe, which can drastically increase your total bill
 
what the heck is that?
 
@ircmaxell Coperto literally means Cover Charge
 
3:35 PM
Anyone know a way to prevent the PHP accessor implementation from making it into PHP core?
 
Ahh, easy enough
 
I like the idea but loathe the implementation.
 
It's not expensive. I just need to remember not to tip
 
Like when you go into a cafe and sit at the table to have a coffee, you pay 3 euros Coperto and 2 Euros for the Coffee, while you would only pay 2 Euros if you had had that Coffee at the Bar
 
@Leigh Fair point, I guess even that way in English is Americanised. Or possibly Americanized.
 
3:38 PM
Ah yes...
 
@DaveRandom *Bastardised .. ized... :(
 
@LeviMorrison It won't get in, don't worry
 
@ircmaxell I hope you are correct.
 
@Leigh Bring on the reign of Queen Victerminator!
 
I'd rather propose something more elegant for PHP 6.
 
3:39 PM
We'll put those wiley colonial types in their place.
 
@LeviMorrison "isset<http://www.php.net/isset> { return isset<http://www.php.net/isset>($this->Seconds); } - Please tell me this is just terrible formatting, and not a planned syntax...
 
does anyone on here use xdebug and netbeans? I cant seem to get the two working together. I've followed all the tutorials i can find and my php.ini xdebug config is: pastebin.com/eFCRG6fV the guy next to has it working and i've done everrything he has done but i'm still unable to debug. I keep getting "unable to connect"
i'm using windows 7, netbeans 7.2, zend server CE, php 5.3
 
But joking aside, I don't like the {} after a variable at all
 
@vascowhite for OP. May be OP is not familiar with PDO. — jhonraymos 5 mins ago
Why do people think this way?
 
3:48 PM
They don't know about PDO, so you can't mention it!
 
4:02 PM
@Gordon i've got xdebug working, but i mean step by step debugging
i've been able to set profiling and tracing, it's just setting up netbeans to interact with the browsert which is causing me flak
 
@Andy ah I see. sorry got no clue about netbeans
 
Damn and blast, i havent done anything which would warrant this not working
everything is as the docs say
:(
 
Guys I'm stuck :(
$date = date($format, $date);
$date = date_create($date);
$newdate = date_add($date, date_interval_create_from_date_string($amount.'days'));
$newdate = date_timestamp_get($newdate);
echo date('d/m/Y', $newdate);
gives me the wrong date :(
 
then ask it for the correct one
 
4:14 PM
@tereško Can't watch at work, but I hope it's along the lines of "Hey idiots, there is no god, now stfu and do something useful"
 
also , use DateTime
 
@tereško Lol I do TRY to aks for the correct one :(
why is my code not working?
 
usually code does not work because it is wrong
 
What I mean is...
Why is it giving the incorrect date?
it swaps the day column with the month one
and adds onto the month column
but not callssing it a s amonth
 
Currently uploading my video to YouTube... Uploading your video. 689 minutes remaining. Gotta love 1080P
 
4:18 PM
basically making the day column a month column and making the month one a day one, and adding to the day one :(
if I add on two days I get 12/08/2012 instead of 10/10/2012
 
@ircmaxell are you using something like en.wikipedia.org/wiki/IP_over_Avian_Carriers
 
No, hotel WIFI to upload a 4gb file
 
Noooooooo
MY REP! MY ILL EARNED REP!!!
:(
@JordanRichards Any special reason you're not using DateTime objects?
 
@MadaraUchiha not really, a part that the fact, they're alien to me (
 
@JordanRichards Think of a DateTime object as a new variable type
int represents an integer
string represents a bunch of characters smashed together one after another
DateTime represent a point in time
What are you trying to do exactly?
 
4:33 PM
Happy :)
 
Quick question, is it possible to stop a PHP form from processing using javascript if all the fields are not filled in?
 
user895378
@user1079641 You use javascript to prevent the form from ever submitting. However, you must always validate on the server-side with PHP anyway because I can simply turn off javascript in my browser.
 
@rdlowrey, never thought about turning off the javascript part, that's true. Thanks for the help!
 
@user1079641 you can but you can not rely over it since any one can create fake form.If you have degrade JavaScript gracefully then any one can use your form with turning off javascript
 
user895378
4:44 PM
@user1079641 Yep, doesn't matter if you validate in JS, you must always validate server-side regardless.
 
user895378
Allright guys, v0.1.0 of my Dependency Injection Container, Auryn, is out there in the public domain. The github wiki should cover things and give you a fair amount of reading if you're into that sort of thing. I would appreciate any feedback (positive or negative, as always) anyone can offer.
 
@rdlowrey You're really willing to provoke the wrath of the PHP OOP police like that? I hope you brought a flak jacket :-P
 
user895378
@DaveRandom That's what this room is for -- best way to improve is to accept criticism, after all. Not to mention I'm a deputy PHP OOP officer myself :)
 
@rdlowrey You're basically allowing people to use DI without actually injecting the parameters?
 
user895378
@MadaraUchiha Not at all. It's all about injecting the dependencies. That's the whole point.
 
4:54 PM
@rdlowrey github.com/rdlowrey/Auryn/blob/master/src/Auryn/… , shouldn't you be using RAW_INJECTION_PREFIX there ?
 
<?php
class SomeDependency {}

class AnotherDependency {}

class MyClass {
    public $dep1;
    public $dep2;
    public function __construct(SomeDependency $dep1, AnotherDependency $dep2) {
        $this->dep1 = $dep1;
        $this->dep2 = $dep2;
    }
}

$injector = new Auryn\Provider(new Auryn\ReflectionPool);
$myObj = $injector->make('MyClass');

var_dump($myObj->dep1 instanceof SomeDependency); // true
var_dump($myObj->dep2 instanceof AnotherDependency); // true
In this example, I don't see you instantiate any SomeDependency or any AnotherDependency
 
user895378
@MadaraUchiha The DIC instantiates and injects the dependency for you. Sorry, perhaps I misunderstood your previous statement.
 
@rdlowrey So that's the point, the container does it, so you don't need to
 
user895378
@MadaraUchiha right.
 
user895378
4:56 PM
@tereško thank you! you're absolutely right.
 
I don't really like the idea, I'll give you that :P
I like to clearly see what's being instantiated and injected
 
and this method needs something to be done with it : github.com/rdlowrey/Auryn/blob/master/src/Auryn/… , that decision tree is a mess
 
user895378
@MadaraUchiha That's fine. It's not for use everywhere. It's for very specific cases where you won't know what needs to be instantiated ahead of time. Like a routed controller in a web-application.
 
and same goes for buildNewInstanceArgs()
 

« first day (723 days earlier)      last day (4218 days later) »