thomastospace, to php
@thomastospace@phpc.social avatar

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.

Any ideas?

fell, to javascript
@fell@ma.fellr.net avatar

Is really more efficient than ? Does anyone have data on this?

kev, to php
@kev@fosstodon.org avatar

My knowledge of 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. 👍

outofcontrol, to php
@outofcontrol@phpc.social avatar

Still follow some folks on Twitter that aren’t on Mastodon, like , Christoph Rumpel and . If they are on Mastodon, not under one of those bot accounts, would love to know.

Crell, to php
@Crell@phpc.social avatar

Should a serializer differentiate between null and uninitialized? Right now does not, and... I am not convinced that it should.

Discussion: https://github.com/Crell/Serde/pull/25

jaapio, to php Dutch
@jaapio@phpc.social avatar

I'm gonna make you feel old... Remember 5 was released in 2004.
To me this means that I have been writing php for 20 years now. How about you?

syntaxseed, to php
@syntaxseed@phpc.social avatar

I have a 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.

Crell, to php
@Crell@phpc.social avatar

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().

(Same for beforeClass.)

tomw, to php
@tomw@mastodon.social avatar

Is Composer just completely stuffed in PHP8 or am I doing something wrong?

(Composer's website seems to list 7.2 as the most recent supported version.)

Edent, to php
@Edent@mastodon.social avatar

Hey, friends - what's the easiest way to compare the speed & memory use of two different functions?

The functions themselves are quite simple (a dozen or so lines) so I can't really be bothered to set up a whole XDebug environment.

Is there an online tool which will give me a rough answer?

ramsey, to php
@ramsey@phpc.social avatar

lowers the amount paid out to 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)

noidea, to php

Hello ..

Today I installed 8.3 on my VServer ( 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, 's Admin Page says this:

version 8.2.18
php.ini /etc/php82/php.ini

and in SSH, the php --version command says that:

PHP 8.3.6 (cli) (built: Apr 11 2024 15:12:15) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.6, Copyright (c) Zend Technologies

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..

Has somebody got an idea what I am missing?

Crell, to Redis
@Crell@phpc.social avatar

Someone please explain to me how TF to use in (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."

carbontwelve, to php
@carbontwelve@notacult.social avatar

My method of installing different 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"

Ugh.

sarah, to php
@sarah@phpc.social avatar

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.

Be a language developer.

#wordpress #laravel #drupal #symfony

sarah, to random
@sarah@phpc.social avatar

PHP needs a code of conduct for the project itself. Is there anyone willing to push for an RFC to add one with me?

thgs, to php
@thgs@phpc.social avatar

Anyone built anything nice with lately and would like to share?

asgrim, to Java
@asgrim@phpc.social avatar

I got a Stream Deck delivered today and started playing around with it already, very handy for step debugging! I have several other ideas already to improve my workflow too...

ramsey, to php
@ramsey@phpc.social avatar

Who will I see at 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. 😬😰

grmpyprogrammer, (edited ) to random
@grmpyprogrammer@phpc.social avatar

I spent this afternoon trying to replace my series of chain-of-responsibility validators with a 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

7php, to php

If you are a PHP Usergroup or a PHP Conference or a PHP package creator, get in touch with me!

I want to interview and host you on 7PHP!

ramsey, to php
@ramsey@phpc.social avatar

Hiring manager: “Your background and experience is impressive, but it’s very heavy, and we don’t think you’d be happy working in our stack.”

This seems to be a common refrain. I’m beginning to interpret it as: we don’t think your PHP experience is translatable to other tech stacks.

ramsey, to php
@ramsey@phpc.social avatar

I was looking at this Sass (SCSS) compiler, written in , 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.

https://packagist.org/packages/scssphp/scssphp

cabbey, to php
@cabbey@phpc.social avatar

Does anyone have a better way to write the conditional calls to foo at lines 5-9 of this 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.)

simonhamp, to php
@simonhamp@phpc.social avatar

Hey 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?

🤔

  • All
  • Subscribed
  • Moderated
  • Favorites
  • normalnudes
  • GTA5RPClips
  • osvaldo12
  • thenastyranch
  • DreamBathrooms
  • everett
  • magazineikmin
  • InstantRegret
  • Youngstown
  • slotface
  • mdbf
  • love
  • kavyap
  • rosin
  • megavids
  • khanakhh
  • modclub
  • ethstaker
  • Leos
  • ngwrru68w68
  • Durango
  • tacticalgear
  • cubers
  • anitta
  • provamag3
  • tester
  • cisconetworking
  • JUstTest
  • All magazines