#PHP community. I'm wondering about a very old PHP memory.
When I just started out with PHP (PHP 5.1-5.3 era), I encountered a bug.
When I did some math in PHP, my browser crashed.
I then send the code to a friend, they ran it on their pc, and their browser also crashed.
When I changed the code, it didn't crash.
I've since then always wondered about this. My guess is I used x instead of *, and typed something like 'echo 3x5'. However, that still doesn't explain the crash to me.
My knowledge of #PHP could be better (read: it’s atrocious) can anyone recommend any resources for learning PHP for absolute beginners? I’m not a developer, I know a little html/css, nothing about JS and enough PHP to be dangerous.
Any recommendations welcome - happy to pay for them too. 👍
Still follow some #PHP folks on Twitter that aren’t on Mastodon, like #Laracasts, Christoph Rumpel and #LaravelDaily. If they are on Mastodon, not under one of those bot accounts, would love to know.
I have a #PHP 8.0 project where comparing legacy hashed passwords suddenly stopped working.
I think it's because older accounts are using blowfish ($2a$) and a salt of 21 characters but whatever it was falling back to stopped working because it wants a 22 character salt.
My client now has users with passwords I'm not sure how to validate because I can't replicate the hash.
I guess my next step is to just regenerate & email new passwords. But I don't like it.
I have only recently learned of the "before" attribute in @phpunit. It seems appealing. What I don't get is... why would I ever use setUp() when I can instead use a before method? It seems like the easier, more portable solution in ever case except when I actively want to bypass a parent class's setUp().
#Tidelift lowers the amount paid out to #PHP package maintainers because demand with enterprise app developers is low.
Received the following in an email:
“Unfortunately, the reality is that we haven’t had as much traction with enterprise app developers using PHP as we have with other ecosystems; our customers tend to build their applications with mostly Java, JavaScript, and Python with smaller amounts of C# and Go. (1/3)
Today I installed #php 8.3 on my VServer ( #Alpine Linux) and tried to switch to that version with ln -fs /usr/bin/php83 /usr/bin/php .
Previously I used php 8.2.x
The problem is, #Friendica 's Admin Page says this:
The phpinfo() included in the admin area also says 8.2.18 and I have deleted the php-fpm82 service and added and started the php-fpm83 service and also restarted the php and apache and mariadb services and rebooted the server..
Someone please explain to me how TF to use #Redis in #Laravel (6, specifically, for now) without just praying that I put the right method name on a facade? How can I inject it instead like a grown up?
Seriously, I can find nothing for how to use basics like incr()/decr() other than "it will simply pass the arguments."
My method of installing different #PHP versions with homebrew is now broken; the versions install but trying to run php results in :"Library not loaded: /usr/local/opt/libvmaf/lib/libvmaf.1.dylib"
Are you a #php developer or a WordPress/Laravel/Symfony/Drupal developer?
Understanding the underlying language will make you more effective and considerably more flexible/employable.
Understanding the language helps you read the framework code and make sense of complex things. It lets you adopt new tech. And it empowers you to switch from one project to another without fear.
Who will I see at #PHPTek next week? I’m giving a keynote on Thursday, and I’m super nervous. It’s only the second keynote I’ve ever given, and the first one was over 10 years ago. 😬😰 #PHP
I spent this afternoon trying to replace my series of chain-of-responsibility validators with a #laravel pipeline…but think it is wrong to do so as I am not sure how to break out of the pipe on the first validation failure. Ideas on how to do this are appreciated #php
I was looking at this Sass (SCSS) compiler, written in #PHP, and I noticed something very odd.
Under “requires (dev)," it requires two packages, sass/sass-spec and thoughtbot/bourbon, both of which appear to be empty packages, containing only a composer.json file, which has no dependencies.
What’s the purpose of these packages? They otherwise appear suspicious, to me, but I can’t see that they're doing anything nefarious right now—they just appear pointless.
Does anyone have a better way to write the conditional calls to foo at lines 5-9 of this #php code? https://3v4l.org/fqCvv The goal is to have the default argument for bar trigger the default argument for foo, but they're different defaults (since one is nullable and the other isn't), and bar should not need to know what foo's default is. (obviously in my real code it's a much more complex signature, and separate classes.)
Hey #PHP folks 👋🏼 got a little twisty thing to noodle on:
If a class and an enum can equally implement an interface, does that mean it's safe to use them interchangeably when your method type-hints the interface that they both implement?