The reason is that PDO was intended as an abstraction layer, to make it easier to switch between databases... whether or not that actually happened in practice... it probably didn't. But emulated prepares aided with it because what databases supported natively differed
his current self-identity on the internat (avatar-wise) is poop emoji. honestly if you are 10 and that is not what you choose wat r u doin with ur life
@MarkR 24 min? (session.gc_maxlifetime), assuming the GC runs... I think it was done to stop busy servers having too many session files open (I normally increase it)
@CraigFrancis Welcome to where mysqli is. I once took a stab at writing what I thought was a simple patch, but I quickly realized that C is one of those languages that has 14 kitchen sinks...
I seed to make a PHP project that is only 3 APIs :-) .. So, I don't want to download/install a framework like Laravel. So, is there any suggested micro MVC for PHP?
Slim is good if you want something lightweight. Symfony these days is actually pretty micro-kernel-ish in practice so it's still worth considering if in the past you would have considered Silex.
If you go to the "Edit your profile" page, you can click on "Change picture" and re-select the Gravatar one and this seems to fix the issue. I don't have an explanation for why it happened though.
I've started developing migraines for the first time, so I am looking for a neurologist on short notice. I've found one that has an appointment in 6 weeks, one in 3 weeks, and the rest of the medical networks in the area don't take my health insurance, or don't even know who my insurance company is. But it was purchased via Healthcare.gov, so it's by definition a 2nd class citizen. Because I've not gotten on to the insurance plan at the new employer yet.
Single-payer national health care, or fuck you please go die in a fire, as painfully as possible.
Apparently neurology departments are swamped these days with long-covid patients. Which, hey, would be less of a problem if there weren't an entire industry in this godforsaken shithole country that spent the entire last 2 years trying to get people sick to own the libs. They can join the rest in the slow-and-painful fire.
@Crell A few years back my mom died of cancer. I learned after the fact that she had skipped going to some appointments because she couldn't afford it and she didn't say anything about it. Made me a much stronger advocate of single payer health care... still don't think it'll happen in my lifetime though.
I must say the term "long covid" annoys me, afaict it's about as useful a term as "hysteria", it's represents 1000s of conditions aggravated by a COVID infection, it is not a specific thing
"complications from COVID" I would be much happier with
@DaveRandom It's an informal term, sure. But right now it's the best we've got for "Covid fucked up something in you and it's still fucked up even after the virus is done."
I fully accept that some people got long term screwed by covid, but not because they got some magical variant that is worse
@Crell yeh that's fair, and it's basically a useless semantic argument, which is why I think this is the first time I ever voice that thought (in the company of people who I know will read it as it was written)
Yeah, from what I read the issue is Covid breaks the lung/blood barrier easily. So if it gets into your bloodstream it can end up lodged in a random organ and fuck that up. Which organ is kind of random. That's why the symptoms of severe Covid are so varied.
Yeah, I just need to vent. And make it clear that if there's any anti-national healthcare conservatives or Trumpists hanging around in here, I personally hate them because they are personally responsible for the pain I'm in right now.
ofc, I've tried to keep up with/educate myself on some of the science of epidemiology and viruses over the last year and a half, but I have taken in maybe 5% of what I have read
doesn't stop me having opinions about it though. you want some shit opinions, I am your guy.
The big takeaways seem to be 1) Aerosol transmission is way more prevalent than we thought. 2) Good quality masks fucking work, for most kinds of aerosol transmission. 3) Lying anti-science activists are a threat to national security and should be arrested and charged with a few hundred thousand counts of negligent homicide.
I'm open to suggestions at this point. I've had cluster headaches before, but migraines are new territory. We're also exploring if it's transient/environmental (eg, trying to get a hold of a mold company to see if we have mold.)
@CharlesSprayberry this is roughly the situation my sister is going through, and my mom had to fight for. My sister just started a job that offers medical insurance to employees, she's seven years older than me.
@Crell tl;dr: get a prescription for a triptan drug, assuming you're not allergic. Probably will require being seen by a neurologist. Triptans are the only drugs that "extinguish" the migraine for me. I used to be on rizatriptan until that stopped working, then was switched to sumatriptan and that usually works.
@Tiffany Yea, I was in my mid-30s before I had my first job offering health insurance. Even then it was incredibly difficult to use. Very hard to find in-network providers.
Doctrine DBAL question: Is there an existing way to map a PHP type to a Doctrine Type? I see how to get an index of the Doctrine types, but no existing map from "int" to "integer", for instance.
And there's a new release every fall, usually with solid new features that make it easier to use. It's the fastest of the major scripting languages. It also has the strongest type system by a huge margin.
@LearningTheCurb Not really comparable. localStorage is for storing data in the browser with Javascript. PHP is for writing the code on the server your browser talks to. Very different creatures.
thank you crell makes a lot of sense, my project includes navigating through storage data [struggling on] but javascript was what i was using but i thought about 'what if i use php' like a noob, but answers my question
PHP is a kitchen sink, and what happens in a kitchen sink you never empty? It gets nasty. And that nastiness seeps into the porcelain. And the stank never comes out.
@LearningTheCurb PHP (especially modern versions) are solid, and will be around for decades to come. Most of the weaknesses it does have come from a time when PHP's philosophy was "continue running at any cost" so it's error mechanisms are inconsistent and confusing.
Sidenote, I can't stress enough how happy I am that new in initializers has passed, the only one I really care about is attributes, it's going to make them easily 5x more powerful
Hmmm, while I'm thinking of it, does anyone here have experience with tailoring the behaviour of phpunit? I'm burning an awful lot of code on loading services up each test, and want to find a way to modify the dataprovider to reflect on the test case and extract services from the container interface and inject them automatically (they're 99% integration tests)
I suppose if you have a provider that specifies a class name, and all of your services are keyed by class name, maybe you could do that in the test itself? (Reflect on the class, get its constructor args, use those as keys in the contaner, pull those out, splat them into the constructor.)
(I just converted my entire test class for this lib over to a data provider 2 hours ago, so it's fresh in my mind.)
Right now I have something like: gist.github.com/markrandall/bd8b970bc8cd57d3f3addcde7be870f8 and the self::sc() reflects the callback and wires the parameters up. Ideally i'd like to shift that logic up so the wired parameters are received directly in the test function
So I'm not sure on what your black magic is meant to represent. I want to avoid all of the reflection etc within the test case because I want to reuse the binding mechanisms from the container builder.
The black magic would be something like (pseudocode):
$params = new ReflectionClass($class)->getParamters()->getAllOfTheirTypes();
foreach($params as $p) {
$args = $container->get($p);
}
$subject = new $class(...$args);
Oh, well if the class is keyed in the container already that way, just $container->get($class)?
If not, specify a service ID instead of a class in the provider and Bob's your second cousin.
okay, say for example I have an e-commerce site, i click a button or link to 'add to cart' will php store that cart data and will it be compatible with my html and js files?
also can php calculate the total and add a total cost and allow to add and remove products from checkout cart
So PHP code only* runs on the server side. It produces an output, which is usually HTML, it then sends that to your browser, which then renders it on your screen.
HTML is just a big long string of characters, it has no meaning at all inside PHP. It only has meaning to your web browser.
@LearningTheCurb The thing to remember (and a LOT of newbies don't understand this, because it's rarely explained well) is that if you're doing anything on the web, you're doing remote procedure call programming.
Your browser sends a message to a program on the server, the program on the server generates HTML/CSS/Javascript on the fly, dynamically and sends it back to the browser. PHP is one of the tools you can use on the server to do that.
@Crell it's the other way round: the hypertext response injects client side scripts with the answer/response which takes control of the users browser (and easily the whole computer system of the user).
No, the browser is in control of interpreting the response; it can just delegate that control of that interpretation to Javascript, if it wants to be stupid about it. (Which most websites are.)
@LearningTheCurb First thing to understand: If someone is starting you on "learning web development" with Javascript, they are doing you harm. Like, seriously, they're doing it wrong and you are going to be worse off for it, because they themselves don't know WTF they're talking about.
@Crell scripts were only one example. someone had the idea to allow xml inside html, e.g. for svg, that even without scripts can bring systems to halt. but no need for xml, css work, too. that is for most browsers just common work, the user normally has not the slightest sense about it. and later on there was the "great" idea of webfonts, most users are "ignorant" to it as well.
I think it better boils down to the original principle that these are not remote procedure calls but nearly 98% are just GET requests for hypertext documents and linked files, including binary blob ones.
But the result itself is the result of a program that runs on the server. Sometimes that program is "Read from disk", but it can be much more complex, too.
But you need to understand "program over here" vs "program over there" to understand why JS and PHP do two totally different things on different computers.
VERY few beginner tutorials I've seen make that clear, and so I've seen a LOT of confusion like @LearningTheCurb has.
and there is even more: chrome is especially bad handling the file:// URI scheme in regard to flesh out most of the browser directly on your system when you cap the line.
HTML: Hypertext. JS: Perhaps hypermedia, but I'm not sure.
I really feel bad for people learning web dev these days. There's 15 time as many moving parts as when I started, and to be useful, you need to know at least the basics of all of them.
But PHP, JS, CSS, HTML, SQL, and then probably at least one build system, if not several. (Composer on the server, and one of the many terrible ones on the JS side.)
but similar what you just said. earlier we did just ftp (at least I did when staring to deploy websites on live servers) so it was clear what the deployment transaction is and that the packaging is local. nowadays, it's this always-on culture that makes it fully intransparent to see the actual processing.
@Crell much, much more complicated honestly. but I also learned. I once wrote myself an FTP client I drag-dropped changed files into. Nowadays I would just be lazy and rsync.
btw. rsync also works quite well with composer. I'm a bit biased if I should allow composer the dynamic/random creation of the autoloader-prefix or make it static. but with atomic deployments and invalidating PHPs opcache, the default configuration of randomizing the prefix seems very versatile with php-fpm and opcache.