« first day (1721 days earlier)      last day (3221 days later) » 

3:00 PM
also, keep in mind that there are quite many AMAs being organized every day
 
Anonymous
@tereško in no way am I saying the situation is right and the mods have every right to be upset but whether they're upset or not, they have been given a responsibility and a level of trust and in this case it has been abused. There are much more professional ways of handling a situation. It's like saying if a dev is pissed off in work, he has every right to fuck up his employers website
 
in general that would be a case, but latest changes in reddit have signalled quite high-handed attitude toward subreddits and their mods
 
"There are much more professional ways of handling a situation."
Fuck that phrase.
Whenever somebody says "professionalism" what they really mean is "I disapprove of someone's actions, but I can't justify those feeling, so I'm just going to call them 'unprofessional'.
If you have a legitimate reason for why they shouldn't have taken the action they took - say it.
Don't just hide behind a fig-leaf of 'being professional'.
"It's like saying if a dev is pissed off in work, he has every right to fuck up his employers website" - except the mods aren't paid, don't have a contract, except for the tacit contract that Reddit won't fuck with the mods first.
Which Reddit did by firing a friend of theirs.
 
@Trowski You can simply use the usual zend_throw_exception_ex
The |E_ERROR there is obsolete, it can be dropped now
 
@NikiC So all the situations were it would throw while compiling have been handled?
 
3:12 PM
there is a reasonable possibility that reddit is going down in flames .. so .. if anyone here has stocks in it: sell them, ASAP
 
@Trowski no, you shouldn't throw during compilation
 
@tereško It's a privately held company.....
 
^ just learned it
 
@NikiC Right, sorry I should have been more specific. Have all the calls to zend_error(E_EXCEPTION | E_ERROR, ...) that would be called during complication been changed to some other function call?
@tereško I really doubt reddit is going anywhere because a few subreddits are closed in protest.
 
you haven't paid attention then, because this is not an isolated incident
 
Anonymous
3:17 PM
@Danack I've just said why they shouldn't be doing it? There are better ways or more 'professional' ways of doing it. I'm not going to list the other ways they could of handled the situation... I think I'll leave this on a agree to disagree. Oh and whether they're paid or not, they still have a responsibility and a level of trust.
 
@Trowski If you mean whether the condition there can be dropped now, then no
 
@tereško So what you're saying is this is an excellent opportunity for me to swoop in an take over reddits traffic when they do go down?
 
@Jay you're saying what they did was unprofessional, without saying what was bad about it other than it was 'bad'.
 
@NikiC There must only be a few instances where that could throw during compilation though...
 
@Sherif it's not that simple, but yes, this would be a good time to launch an alternative service
 
3:19 PM
@Trowski yes, but we don't want to crash if we miss something
Though to avoid crashing it's probably enough to drop the check for parse_error in the exception ctor
 
Anonymous
@Danack 1) I haven't mentioned the word unprofessional 2) I've already explained why what they have done is 'bad'. Let's just agree to disagree aha... I can't stand reddit anyway.
 
> "There are much more professional ways of handling a situation."
 
@Danack He's agreeing to disagree that he mentioned the word unprofessional as he disagrees of your agreement of its mention.
There... now that I've made everything crystal clear we can all agree that reddit sucks ass
next subject
 
/r/php is alive, that's all that matters right? :P
 
Anonymous
3:23 PM
Well that cleared that up .. xD
 
@Trowski that and in the create object handler
 
Every programmer's fantasy...
 
@salathe well, it's spreading. The /r/PCMasterRace went down couple hours ago
 
@NikiC That one looks like it should be fine.
 
@tereško I don't know what that is... but okay
 
3:26 PM
it's a gaming sub
also /r/europe
 
so ... I would have to move ...
 
@JoeWatkins fb?
 
@JoeWatkins it's starting to look quite likely
 
@Sherif yeah
 
this whole clusterfuck will not be the death-nail, but the next incident is likely
 
3:34 PM
and because of tax and cost of living, it's not worth it, at all ...
 
also, FB is not a good idea, since it has been on a decline since 2014
 
@NikiC Could you explain what's going on here: lxr.php.net/xref/PHP_TRUNK/Zend/zend_execute_API.c#1318
 
Hmmm? Their stock is up 0.43% since last year.
 
I mean in the user activity
 
@Sherif Using FB has become just painful though. I only go there when a family member asks if I saw something they posted, lol.
 
3:36 PM
@Trowski In some cases we don't want a missing class to throw. E.g. if it's missing in an extend. You'll end up with some weird partially-bound class
 
also, @JoeWatkins, if you thought that /r/PHP was filled with stupid, the FB groups are worse
much worse
 
@Trowski It's still a huge fucking company. You also realize they've bought out a lot of interesting companies recently, like Oculus. facebook.com is not all there is to work on at facebook.
 
@Sherif That's a decline in real terms. Look at inflation.
 
@Sherif Yep, I know. I just wish their core product was a bit more compelling.
 
hmm .. well, @Sherif is starting to look more and more like zaibatsu, but the main site is on a decline
 
3:41 PM
@tereško wtf is a zaibatsu
 
japanese thing
think "yamaha"
 
Something as big as facebook is bound to feel the impact of any shift in momentum. When your user base is over 1 billion people, the tiniest drop in traffic reverberates quite strongly. That doesn't necessarily mean it's still not a good place to work.
You have to consider the opportunities for growth. Not just fluctuations in traffic that you read about on the Internet.
What you want is to find a place to work where it will compliment your career plans and personal growth. Not just something that's currently exhibiting a lot of hype. Hype comes and goes. I've worked for companies that had hype before. It's not what's interesting at all.
 
re
 
4:02 PM
 
One day, I will put two libraries I have written together in an app and not be surprised that they work. Today is not that day.
 
HI ALL
can anyone tell me
what is the best solution for HTTP request on HTTPS?
I tryed cURL
but it is crashing apache...

So what is the best solution for this?
 
@NikiC Other than those calls in Zend_execute_API.c, is there any of these that couldn't use zend_throw_exception_ex? lxr.php.net/…
Everything looks like runtime to me.
 
@Trowski check the ct eval code, some of it might call into execute fns
 
@NikiC Now you lost me, what's the ct eval code?
 
4:19 PM
@Trowski Compile-time eval
We fold some constexpr operations
There's probably a bunch of cases where illegal operand types could throw
 
Ah, which then it shouldn't because it's during compile time.
@NikiC Let me put together something quick and you can take a look at it.
 
4:41 PM
I'm being dumb - on the page getbootstrap.com/components there is a menu/nav links on the right of all the content on the page. What is that sort of component called?
 
4:58 PM
@Danack navbar? you mean the sidebar menu, right?
 
yeah...with scrollspy to make do stuff.
 
i have no idea what scrollspy is :P
 
getbootstrap.com/javascript/#scrollspy - it's the thingy that makes the navbar doohickey show what is current on the page...
 
ZEND_CALL_VAR_NUM() and then applying bitflags to 0x3 range :-/ And I wonder why that works at all until I realize that there's really a ZEND_CALL_VAR_NUM(), just to implicitly bitshift that a bit :s
 
@Danack no idea, seems the component is just class="nav" but i don't use bootstrap
 
Anonymous
@Danack It's referred to as a docs sidebar i think
 
@Danack that's great! will bug you constantly with bug reports then xD
 
I don't he's started yet - might be catching up with him next week, so will be able to find out.
 
@NikiC why… whyyyyyy… (rfc for void)
 
5:24 PM
Any MySQL guru here?
 
@Danack i have the feeling they don't give to phpstorm the same importance they give other IDEs they make. and that's strange considering the numbers of php. hopefully with a man inside we will get better stuff :P and they at least showing interest. it would be really sad if they would decide to abandon the phpstorm development, because even if it's not perfect, it's still the best ide we had in years
 
> it's still the best ide we had in years
 
That's possibly the issue - for other languages there is more competition in IDEs. For PHP, what are people going to do when they encounter a bug in PHPStorm, start using netbeans again?
 
yeah.
i find quite frustrating the EAP fixed bugs @Danack they are all about random libraries and framework nobody should use
 
5:34 PM
@bwoebi hum? what's wrong with it?
 
that rather than fixing bugs that are important to any php code
 
@RonaldUlyssesSwanson I doubt that they decide to implement things arbitrarily. They will be looking at feedback from users, and unfortunately there are legions of people who can't think for themself, and need their IDE to support all the things for them to be able to use their framework of choice.
 
also now they started following php-fig stuff. which means that they'll wait years for the phpdocumentor guys to complete the proposal (ETA February 2073) to do something, and it will probably be wrong
 
I don't believe the PHPDocumentor guys are in fig fully......and you should be hassling them directly rather than JetBrains for that stuff.
 
5:41 PM
> I have been contributing to the Laravel Framework for just over a year and am the second highest contributor, Taylor Otwell being the first.
And I'm out.
 
lol
i hate being unpleasant to open source stuff. but honestly some of them, well, have no clue. the phpdoc spec they are going to propose has still the same unsolved problems and it also introduces new ones. just look at @inheritdoc -__-
i'm waiting for 11-ig (room 11 interoperability group) to become a thing
 
Hi
$date = "10 July, 2015"; $time = "13:00"; $dateTime = DateTime::createFromFormat('Y-m-d H:i:s', $date . ' ' . $time, new DateTimeZone('Europe/Berlin')); $dateTime is after that just "0" ! What am I doing wrong? –
 
Reusing variable names so that it's hard for you to see the bug in your code.
Y-m-d != "10 July, 2015" presumably.
 
5:57 PM
d-m,Y ?
 
Why don't you just try it....
 
why don't you just say it? whyyyyy??
:D ok thx
I'll try
ok that wasn't the error
it still dosen't work
 
@user3037960 What exactly is the code doing now, and what do you expect it to do?
 
ehm nothing oo
 
@user3037960 you had one error in the string format - did you check that you didn't have any others?
 
6:01 PM
the page is blank
$date = "10 July, 2015";
$time = "13:00";
$dateTime = DateTime::createFromFormat('d m, Y H:i', $date . ' ' . $time, new DateTimeZone('Europe/Berlin'));

echo $dateTime;
 
posted on July 03, 2015 by kbironneau

/* by LordAshram */

 
this is what I'm trying to do.

I want to make an datetime objekt from the strings
someone any ideas?
 
3 mins ago, by Danack
@user3037960 you had one error in the string format - did you check that you didn't have any others?
 
@user3037960 Try putting the code into 3v4l.org, or add the following above it: ini_set('display_errors', 1); error_reporting(E_ALL);
 
I wrote this above my code: ini_set('display_errors', 1); error_reporting(E_ALL);
its still blank - no errors
@Danack
'd m, Y H:i'
this should be ok ?
 
6:08 PM
Does the time match?
 
what I want is to get from my "10 july, 2015" and "13:00" to this format '1995-12-05 19:00:00'; so that I can save it to postgresql with redbeanphp.com/crud
 
....
 
$date = "10 July, 2015"; ==> d m, Y
yes
 
Anonymous
echo $dateTime->format('d m, Y H:i'); ?
 
@bwoebi
 
6:12 PM
@jay
?
No one? any hints?
I'm trying this over 4 hours!!
2
Q: Convert javascript new Date() to php DateTime()

user3037960I have 2 fields in HTML: <input id="datum" type="date"> <input id="uhrzeit" type="time"> Javscript: var datumUhrzeit = new Date($("#datum").val()+","+$("#uhrzeit").val()); console.log(datumuhrzeit); "Tue Aug 18 2015 16:45:00 GMT+0200 (Mitteleuropäische Sommerzeit)" How can I convert "Tue...

 
@user3037960 why are you ignoring my suggestions:
4 mins ago, by Danack
Does the time match?
You're deliberately trying to focus on the wrong thing?
 
> This gives PHP a bad rap compared to a lot of other languages.
 
I tried this:
'd M, Y H:i' // with big M
 
O
M
G
 
No, what gives PHP a bad wrap are all of the illiterate people that neither know how to write code or English.
 
6:15 PM
DOES THE COCKING TIME MATCH?
 
hä what do you mean man?
haha
yes it matchs!
 
"13:00" matches "H:i:s' ?
 
no!
but I dont have s in my code
"s"
('d M, Y H:i')
no s
 
23 mins ago, by user3037960
$date = "10 July, 2015"; $time = "13:00"; $dateTime = DateTime::createFromFormat('Y-m-d H:i:s', $date . ' ' . $time, new DateTimeZone('Europe/Berlin')); $dateTime is after that just "0" ! What am I doing wrong? –
 
6:17 PM
yes true, but hehe I already corrected that
haha sorry
this is the actual:
$date = "10 July, 2015";
$time = "13:00";
$dateTime = DateTime::createFromFormat('d M, Y H:i', $date . ' ' . $time, new DateTimeZone('Europe/Berlin'));
 
I don't know - if I was going to investigate I'd suggest starting from an example (from the manual page) that works, and change one thing at a time until it either breaks, or you have what you want.
And also, you could just try it locally through the command line - you would then at least get any error messages rather than just a blank page.
 
@user3037960 You understand there is a huge difference between something like DateTime::createFromFormat('d M, Y H:i', $date . ' ' . $time, new DateTimeZone('Europe/Berlin')) and DateTime::createFromFormat('d M, Y H:i', $date . ' ' . $time), right?
 
actually 5hours ago I didn't know it but now I understand it
It works!!!
 
Anonymous
@user3037960 What happens if you var_dump ?
 
so with this DateTimeZone it just adds some hours to the UTC one? right?
 
6:21 PM
how would you name an abstract type whose instances have a globally unique hash code? was thinking of Singleton but reminds the pattern, which is not
 
Anonymous
@user3037960 you still there?
 
Can we share our queries here too
 
yes, but it works perfectly
thank you!
 
hehe
plain php is such a mess :p
I'm switching to node.js
 
6:34 PM
I'm going to make that Derrick's profile page
 
so I dont have to convert js date() to php date ...
 
The resemblance is uncanny
 
This is meant to be step 1. Step 2 is defining some more Error classes and throwing more specific exceptions (maybe something like BadFunctionCallError).
 
6:51 PM
@Sherif Everyone fails the first time... and anytime thereafter because the DateTime API is bollocks ;-)
 
@DanLugg I actually find it far more intuitive and versatile than most other DateTime APIs I've worked with.
 
@Sherif Undoubtedly, I've seen worse. Better than terrible is hardly good though.
Maybe all DateTime APIs suck.
 
how can i convert an array to a json object?
should I ask it here or google it by myself?
 
@DanLugg It's hardly bollocks though.
 
Anonymous
json_encode @user3037960
 
6:57 PM
thx
json_encode() !
right
should I change the chat for jquery and javascript questions?
 
You should probably spend a little time searching SO for answers before you bother with chat.
Judging by the level of basic questions you're asking right now, chances are you'll find answers much more quickly that way.
 
Anonymous
Yeah, and if you can't find the answers on Google, you'll probably have a better chance of getting an answer to your question in the js/jq room.
 
7:16 PM
I'm sorry, one last Matrix meme ...
OK, now I'm done.
 
@Trowski It looks very weird to me
The bit about passing in E_EXCEPTION that is
 
@NikiC I didn't like it either, I did it at first just to make it work quickly. I was hoping you'd have another suggestion.
 
I'm not clear about what you're trying to do here
 
@NikiC I did it because of situations like this, but I could handle those specifically and just avoid passing an error constant
The purpose is that there was no way to throw anything other than Error. I'd like to be able to specify something different depending on the situation.
 
@Trowski Ah, now I get it
 
7:24 PM
@NikiC Let me see what I can do... I'm sure I could get rid of the need to pass the constant.
 
@Trowski I'd prefer to reuse the normal zend_throw_exception_ex to do this and adjust the throw code to make sure it's okay during compilation (probably still by converting to a fatal error)
(Though I'd like to have a zend_throw which is zend_throw_exception_ex without the ugly code argument)
 
@NikiC Ok, let me work on that then.
 
@Trowski While you're at it, mind setting code to 0 instead of E_ERROR/E_PARSE?
I forgot to do that after the error message changes
 
Ok.
 
I should stop doing mad mad things - so I have property reader and writer on an object that expose random C things as public class properties... I'd like extended classes to be able to set values for those only looking those values up and making sure they get passed through at object construct time appears to be a major major pain
 
7:42 PM
@ElizabethMSmith I always wondered how the DOM classes handled read-only properties, but never bothered looking at the implementation.
Is it really that painful?
 
readonly is the easy part
:)
 
I'm confused. Which is the hard part?
 
the hard part is apparently class whatever extends internal { public $x = 15} <- finding that and sending it into the custom read_property
 
Ahh, the class initializor
gotchya
 
yup
it works fine if you're just using regular properties
but if you're also hijacking to say read/write into an internal C struct
well that's just even more fun :)
 
7:45 PM
@ElizabethMSmith You've been known to do fun things though
 
@Sherif "Judging by the level of basic questions you're asking right now, chances are you'll find answers much more quickly that way."
I programm since more than 10 years :/
 
bad wrong and evil are usually the correct terms
 
@ElizabethMSmith Awwwe, come on, gtk wasn't wrong and evil :p
 
oh but the windows threading extension
that one is
soo completely
anyway
 
7:48 PM
@user3037960 That's awesome. I've been programming for more than 15 years, but I still have plenty of questions about things I don't know or am not familiar with. There's nothing wrong with asking questions. I was just suggesting that you are likely to get to the answers more quickly because of how common the questions are (someone is likely to have answered them on StackOverflow already).
Knowledge of tools in programming is not awarded by tenure, because technology changes way too fast for any one person to keep up. Half the technologies I use at work today don't even have books written about them because they've only come out in the last 6-12 months.
 
Evenin'
What is ongoing dissusion?
 
user4268046
@Sherif Hey, about what we were talking about before, how would I got about disabling them? as I don't have a list of every Feature.
 
@TheMineBench I'm afraid I don't recall what we were talking about before. You'll have to refresh my memory.
 
user4268046
The idea was I had interface called Feature which had the methods enable(), disable() and isEnabled() and I wanted a way to have a FeatureManager that would enable/disalbe them based on States (the state is just an int)
 
user4268046
So I had array(State => array(Feature)) for which features should be enabled on which states.
 
user4268046
7:58 PM
then onStateChange it would loop through all the ones that should be enabled for that state, and if they aren't already enable then enable them.
 
OK, and what's the problem?
 
user4268046
There is no list of all the features, so we don't know which ones shouldn't be enabled on the given state
 
You just said you have an array of features.
So you do have a list.
 
user4268046
I have a map from State => Feature[]
 
Yea, that's a list.
 
user4268046
8:00 PM
that's all the features that should be enabled for that state
 
Yup, you said that.
 
user4268046
I don't have a list of everything else that might be enabled
 
What's the problem?
Everything else?
What is everything else?
 
user4268046
E.g. array([1] => array(x,y,z), [2] => array(x,z))
 
user4268046
So when the state becomes 1 it enables x y and z
 
user4268046
8:02 PM
but then when state 2 comes along it would check x and z and find that they are both enabled and do nothing.
 
user4268046
but it does not disable y
 
Why not?
all pun intended
 
user4268046
When is it disabled?
 
Why does it need to be disabled?
You just stated that everything in state 1 should be enabled.
 
user4268046
I want it so things are only enabled during the specified states, and disabled during the rest of them.
 
user4268046
8:04 PM
So on state 2 is should call y.disable()
 
And why's that? Y isn't in state 2 in your example.
 
user4268046
Correct, that's why it should be disabled
 
If it needs to be, then just move it there.
wait... what?
The more you talk the less I understand from you.
 
user4268046
I want y to be enabled during 1, and only during one.
 
OK
 
user4268046
8:06 PM
so after 1 it should get disabled
 
What is the logic that determines if something should be enabled or disabled, exactly? Clearly it's not just what state the object is in.
You are introducing new rules to determining this logic so you'll need to come forth with them if you expect me to help. Otherwise I'm just guessing what you want.
 
user4268046
There is a array(state => Features[])
A feature should be enabled when it is in the list of Features for current state.
It should be disabled when it is not in the list of Features for the current state.
A feature should not be disabled then re enabled if it is in two states that come right after eachother.

eg if Feature x is in the list for both state 1 and state 2 then it should be enabled at the beginning of 1 and disabled at the end of 2.
 
How can something be in two different states at the same time?
What is this quantum programming you're doing?
 
user4268046
Array ([1] => array(x,y), [2] => array(x,z))
x is in both 1 and 2
 
So X is Schrödinger's cat?
 
user4268046
8:14 PM
What? No x is not both alive and dead...
 
It's in two different states at the same time though.
 
user4268046
Oh... state is like GameStates aka In_Lobby In_Game etc
 
user4268046
and it's universal
 
OK, but in a finite state machine you typically can't be in two different states at the same time.
So the question remains. How can X be in two different states at once?
 
user4268046
I'm confused, states go like 1>2>3 etc, it is just stored that x is going to be enabled during two states.
 
8:17 PM
Ah, now we're finally getting somewhere.
So you need two different things here. One is a list of which states something is to be enabled in. And the other is the list of states that the object is currently in.
Don't try to roll them both up into one.
The point of keeping track of which state the object is currently in is to be able to locate that object when the state changes.
That's very different from the utility of knowing in which states, which objects need to be enabled or disabled.
 
user4268046
Correct which is why I wanted a map from Feature => state[]
 
user4268046
But you can't use a object as a key in php
 
That wouldn't solve your problem either.
 
@Naruto dayum that is noice!
I took half a day off though to grab a beer
 
What you want is an easy way to look up all of the objects in state X so that you can enable/disable them and move them to a different state. Not the ability to map an object to some state value. For that you'd just have very well coupled a State object to the Feature object and made it a property of the State object.
 
user4268046
8:22 PM
So using state => Feature[]

I should just get all the features that are in the last state, then disable the ones that aren't also in this state?
 
Beer > pool
Sorry I am an asshole like that
 
@TheMineBench No, no, no, no, no, no, no. For the last time... NO
Stop trying to roll them up into one list.
This is why you are so confused. You're intentionally making it harder on yourself.
Stop worrying about what happens next and stay focused on what's happening right now and this all starts to become so much simpler.
 
Can anyone help me with this SQL query:
SELECT *, SUM(Amount) AS Total_Amount FROM `ogygafsf_pos` . `purchases` WHERE `Purchase_ID` = 1
Basically there are 2 rows with Purchase_ID of 1
But its showing only 1 row
when performed on sql window
If I remove the "SUM(Amount) AS Total_Amount" then it returns both rows
 
user4268046
@ZahidSaeed Thats because you are using "SELECT *" which selects everything
 
@TheMineBench I want to select All columns as well as want to calculate the total of amount column
 
8:26 PM
@TheMineBench Say you have $arr = [1 => [X, Y], 2 => [Z]]. Consider for a moment that anything in $arr[1] must be in state 1, right now. Consequently, anything in $arr[2] must be in state 2 right now. When onStateChange is triggered you have both the $oldState and the $newState. All you want to do is take everything in $arr[$oldState] and move it to $arr[$newState]. That's it! Nothing else.
In the process of doing that you can apply whatever logic you need to enable/disable the things in $arr[$oldState] based on what $newState is.
 
sum is an aggregate - I see no group by
in teh sql
 
Can anyone help me out please ?
 
user4268046
@Sherif Sorry I'm a little confused... what do you mean by take everything in $arr[$oldState] and move it to $arr[$newState]?
 
Exactly that.
 
Anonymous
Helloooooooo!
 
Anonymous
8:29 PM
:D
 
user4268046
@ZahidSaeed If you select everything, why not get the sum once you receive the data?
 
user4268046
(I don't sql much...)
 
@TheMineBench you mean run another query ?
 
$arr[$newState] = array_mrege($arr[$newState], $arr[$oldState])
What is so complicated about that?
The objects have moved to a new state. So you move them.
 
you can't do the sum that way in a single query zahid - sum works by aggregating rows together
so if you want the sum of everything - plus your select you'll need 2 queries or a subselect
 
user4268046
8:31 PM
I'm confused, won't array_mrege return X, Y and Z?
 
Yup, what's confusing you?
 
user4268046
So how does that tell me what to enable/disable?
 
@ElizabethMSmith ok I get it, one way to do it is to write another query. But what do you mean by subselect ?
 
@TheMineBench Well it doesn't, at least not by itself, because according to your requirements you have a list of states in which things need to be enabled or disabled as well as knowing what the current state of that thing is. So keeping track of the current state tells you one half of the story.
 
stackoverflow.com/questions/8757061/sumsubquery-in-mysql <- here :) stackoverflow has all the answers
 
8:34 PM
The other half is the mysterious, unknown, hidden, never discussed, thing that only you know that you have never shared with me. I'm assuming you can take care of that part on your own since you chose not to share it.
I just assumed you could take it from there.
:)
 
depends on if a more complex query or more queries hitting the db is a better optimization for your use case
 
user4268046
Ah, I guess I'm confused why you set $arr[$newState] to array_mrege($arr[$newState], $arr[$oldState]). Won't that overwrite $arr[$newState]? information we still need in order to figure out what to enable/disable?
 
Yes, it will overwrite, but you already have the information you need. You can do it before you overwrite.
Sheesh, I feel like I have to hold your hand right now.
 
user4268046
Ah ah... right... um yeah, states can happen out of order... so you can't over right it as that state might happen later, however I can just store the original array... Thanks :)
 
o.0
The state change is triggered by the onStateChange callback. What on earth do you mean by "happen later"?
Why would you have a onStateChange callback if it's triggered by anything other than a state change?
This is beyond nonsensical right now.
 
user4268046
8:40 PM
So states could go 1>2>3>2 so if I over right array[2] when it goes from 1>2 then I won't have the original features that should be enabled on state 2.
 
huh?
I'm going to stop reading now.
 
user4268046
Ok, I think I understand a little more now. thank you :)
 
good evening ladies.
 
Does anyone know of library that will take $_GET, $_POST etc and produce a PSR-7 Request object? And also be able to produce a response object.
 
Thanks @ElizabethMSmith it worked ! :)
 
8:49 PM
okie dokie
 
@Danack Doens't PSR-7 follows Symfony Request?
 
Don't think so.
 
> (void) should be reserved in class, interface and trait name contexts, because this is a likely candidate for the demarcation of void functions (which do not return a value)
 

« first day (1721 days earlier)      last day (3221 days later) »