Is the practice of defining an extra member that is static which holds the exact value of a private member of an object so it can be used to pass the data around the application without the threat of its modification leading to disrupting the flow or business logic of the application considered okay or bad? I know its opinion based. But just want to know what you guys think on this.
Sorry if i was confusing. My issue is that i need an effective way to communicate certain data between different classes. Now since the members are private and their data is assigned in the construct method of one class. I also set those values to static members For example - $this->name = "John' self::$_name = "John";
So any other class that needs access to the name can do so by calling ClassA::$_name;
What I'm saying is, I would typehint the user class into the functions that need the name (or just ask for the name) then design the app in a way to always pass the instance of the user (or it's name) to the functions or methods that need it
@SagarNaliyapara we have asked you numerous times not to randomly ping people. I get a feeling you are doing this just to annoy us. For the last time now: please stop it.
if this happens again, I'll ask a mod to ban you for a week
my partner and I, we're in our thirteenth year together this year, we're going to registry office to give notice to marry, we'll be married in the next couple of months ...
24
if I make appointments, or can't concentrate because I'm thinking about code, I'll never hear the end of it ...
I'm in the UK, so there is no such thing as summer ... we're going to get it done quite quickly, this is something we have been talking about for ten years ... no more procrastination ...
you can get married on a summers day, and it'll still rain ... we're not so bothered about weather ...
I genuinely have memories of doing barbecues in the rain ... it even looks wrong in my minds eye ... but it happens ...
@Epodax actually no, it's because our summer air is carried over Atlantic or Indian ocean, very warm climates, but above the uk is the Arctic Circle ... what happens when warm air meets extremely cold air ... so it can literally be in the thirties and still rain ...
when air pressure is high, it slows weather systems, when that happens in summer it can be hot for a couple of weeks at a time ... but when it is, everything breaks down anyway, planes can't take off, infrastructure fails - railways, grid etc, it might as well be snowing ...
like? :P i always said "before dying i just want to see national football team winning a world cup" then they won it and i started worrying about my life
I have a VPS server ( with Apache server ). using WHM (PHP Configuration Editor) i have update php.ini.
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 3000
max_input_time = 6000
memory_limit = 3000M
upload_max_filesize = 1024M
post_max_size = 1024M
and after...
https://stackoverflow.com/questions/5229501/how-get-all-values-in-a-column-using-php/ All the top voted answers for this question are still using the old mysql methods that are removed in php 7, can we do anything about this?
@ferrybig and downvote those that are no longer good answers. however, just because they are deprecated doesnt mean you can no longer use them. you can still install the extension.
A more aggressive approach but usually works well, is to just edit the answer, and then drop a comment and say "I've edited because mysql is gone bla bla bla"
@MadaraUchiha not everyone has the option to rewrite loads of code, though I'd guess those also wouldn't upgrade to php7 either. feel free to add snippets for pdo and mysqli
@MadaraUchiha Well, the original docs have those fancy screaming red boxes saying "don't use this piece of **** anymore". The main problem is all those homemade tutorials written back in 2005 that people still use as if they're useful.
@MadaraUchiha or they've just discovered templates and decided to use them for goddamn everything holy crap what is this code even doing anymore gahhhh
stackoverflow.com/questions/34609907/… <- I flagged this as primarily opinion-based, the flag was declined but I can't seem to understand why, to me it looks like the OP is looking for opinions / review / confirm of an idea which seems unsuited for so? (Disclaimer: not trying to bring attention to question, simply understand so I can get better at flagging more correctly).
@FélixGagnon-Grenier I don't think this is a good way of solving that problem. Since @MadaraUchiha cannot be bothered to put up a bounty, I am putting one up.
@FlorianMargaine quite similar here. The little one woke up at 4. Took me until 5 to convince him to sleep again. Then I couldn't sleep anymore and went straight to the PC
This question has 3 answers with >100 upvotes.
The 3rd answer is very fine (obviously, since I'm the author), but the 1st and 2nd answers are terrible by all accounts.
The first one relies on jQuery to do a loop (wut?), the 2nd one relies on eval to do a sum. Let that sink in. eval to do a sum.