PHP

Crell, in Rethinking Mocking: DIY Approach vs. Frameworks on examples in PHP and Typescript - SarvenDev
@Crell@phpc.social avatar

@symfonystation You forgot the benefits of anonymous classes. I almost never use a mocking framework anymore since they were added.

https://peakd.com/php/@crell/don-t-use-mocking-libraries

symfonystation,
symfonystation avatar

@Crell I did not write this but I appreciate your point.

walter_wiggles, in Rethinking Mocking: DIY Approach vs. Frameworks on examples in PHP and Typescript - SarvenDev

This is bad advice. Mocking libraries have come from many years of experience. Rolling your own test library will be like reinventing the wheel, but with less documentation and more inconsistencies.

64bithero, in Why PHP continues to be a popular but divisive programming language
@64bithero@mstdn.games avatar

@symfonystation I love using the language and I’m tired of people claiming it’s obsolete and not useful. Not everything needs to be c-sharp or rust

michael, in Properly restart Opcache after deployment
@michael@thms.uk avatar

@symfonystation I’ve been using systemctl restart php-from for a long time.

The problem with any of these other tools is that they always rely on some php code to refresh the opcache. But what if the opcache has an outdated version of that code cached?

I’ve been bitten by it a couple of times. So restart php-fpm is far more reliable for me.

MeanEYE, (edited ) in Fix PHP 8.4 deprecation: Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead
@MeanEYE@lemmy.world avatar

Just using PHP is making me want to stop using it. There are so much code out there that they keep deprecating consistently for a while now.

I know they are trying to make it better, but we are already used to it being shit. We worked around those issues. Now we have to work again to adapt to new rules.

slazer2au, in Why PHP Usage Has Declined by 40% in Just Over 2 Years

I did not expect WordPress to be the reason PHP is declining but hot dam that graph drop is horrific.

https://cdn.thenewstack.io/media/2024/04/e3e39ac0-builtwith_php24-1024x890.png

grandel, in 10 tools that every PHP developer should use

The only “must have” I agree on is Xdebug and an IDE (but not specifically PHPStorm)

grandel, in 10 tools that every PHP developer should use
  1. Spotify

Wat

lianass, in PHP 8.2: A Glimpse into the Future of Web Development

If you, like me, are creating a website. I would advise you to pay attention to the website database. This is a very important indicator and the key to success. Databases are very important now and turn a website into a dynamic platform.

cxj, in Failwind UI And The SPA Clown Shoes (HTML Illiteracy Part 4)
@cxj@phpc.social avatar

@symfonystation Wish I could read this but don’t want an app or a FAANG snooping on me, so oh well.

tito_swineflu, in Reducing PHP's CPU usage by nearly 40% by upgrading from Ubuntu 20.04 to 22.04
@tito_swineflu@sfba.social avatar

@symfonystation This seems like a shocking indictment of Ubuntu 20.04 to me. Is there any analysis of the underlying reason? I couldn't find any in this article.

symfonystation, (edited )
symfonystation avatar

@tito_swineflu Not that I know off. You might try contacting the author for the details of their setup.

sirber, in Reducing PHP's CPU usage by nearly 40% by upgrading from Ubuntu 20.04 to 22.04
@sirber@fosstodon.org avatar

@symfonystation PHP version upgraded too?

dcoderlt,
@dcoderlt@ohai.social avatar

@sirber @symfonystation
The first graph shows they were running php 8.2 on both OSes.

oliver, in Never write another loop again
@oliver@phpc.social avatar

@symfonystation I don't get it, are loops now evil? Why would one want to not use them? Stuffing arrays into collections in order to manipulate them "nicely" is not a crime, sure. I just have a problem understanding why the other way is presented as bad/no-no.

godlike, in DepScan ❤️ PHP
@godlike@phpc.social avatar

@symfonystation The real issue here is that too many PHP applications are not configured to work with a single PHP entrypoint, instead, they enable any dot php file to be served. This is criminal often, specially on nginx where you can't ship these rules like Apache (an .htaccess file on web root) and users share their own rules without realizing the hazardous conditions.

abhibeckert, in What’s new in PHP 8.4

Seems like a pretty modest release, other than the new JIT.

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