PHP

Schrank,
@Schrank@phpc.social avatar

I have a cli script which looks like this:
->run($argv[1], $argv[2]);

the 2nd parameter is optional and has a default value. Is there a way to not pass $argv[2] if it is not present to not run into

run(): Argument #2 ($path) must be of type string, null given

Or do I need to test this and have two different calls?

theseer,
@theseer@phpc.social avatar

@Schrank ?? 'default'

derickr,
@derickr@phpc.social avatar

It's PHP's birthday! 29, years old today.

#php

A cake cut out a slice off, and the big side taken.

lewiscowles1986,
@lewiscowles1986@phpc.social avatar

@derickr @rasmus happy birthday

derickr,
@derickr@phpc.social avatar

@maswaba Yes! Without users like you (and me) back then, it would never have gotten big.

kubikpixel,
@kubikpixel@chaos.social avatar

I still need to take a closer look at the toots of @shadowserver but it seems to be an other argument against and on Windows to the boss and customers… 🙄

»[…] A critical vulnerability in the PHP language can be trivially exploited to execute malicious on devices, security researchers warned as they urged those affected to take action before the weekend starts. […]«
– on @arstechnica

⚠️ https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/

martijn,
@martijn@ieji.de avatar

@kubikpixel @shadowserver @arstechnica
Only hits the windows version. But I haven't heard anyone doing webdev on windows that doesn't use wsl anymore. Wouldn't really know why you would want to use xampp or windows specific versions anyway except for some obscure use cases (like directory access etc)

kubikpixel,
@kubikpixel@chaos.social avatar

@martijn ...I absolutely agree with you, but I still have such cases, even from bosses who call themselves professionals 🙄

Skoop,
@Skoop@phpc.social avatar

I wrote something about making the choice between upgrading or upgrading: https://skoop.dev/blog/2024/06/07/upgrade_or_upgrade/

Skoop,
@Skoop@phpc.social avatar

@ralphschindler Laravel Shift seems to be Rector on steroids?

ralphschindler,
@ralphschindler@phpc.social avatar

@Skoop for what shift is doing, I'd say rector might get you nearly 1/2 way there.

The primary goal of shift is to make your application code look as if it were installed into a fresh modern application skeleton, down to the comments... that is in addition to doing the application code refactoring and composer updates.

ramsey,
@ramsey@phpc.social avatar

It boils my blood to hear folks insinuate that is the source of their performance problems and they should switch to microservices in another language to fix the performance issues. Maybe spend a little bit of time figuring out where your bottlenecks are and fix those, first!

(This may or may not be a sub-toot.)

itsjoshbruce,
@itsjoshbruce@phpc.social avatar

@ramsey: This pool cue is warped.

I totally meant for it to go in that pocket after banking off five rails (I mean API calls).

It’s gotta be the shoes.

ramsey,
@ramsey@phpc.social avatar

@preinheimer This is usually the case for developers who rewrite things in a different programming language, too, so it’s rarely the programming language itself that made things more performant.

ramsey,
@ramsey@phpc.social avatar

What’s the difference between memory usage and peak memory usage?

(As in #PHP's memory_get_usage() and memory_get_peak_usage() functions.)

Crell,
@Crell@phpc.social avatar

@ramsey @sean That is my understanding. Though as usual, when the current memory goes down is rather unpredictable.

alfredbez,

@ramsey keep in mind that there is also memory_reset_peak_usage(). Take a look at how these functions behave here: https://3v4l.org/60tlE#v8.3.8

wowa_TYPO3, German
@wowa_TYPO3@techhub.social avatar

🌟 Das Programm der Developer Days 2024 ist online! Von der Eröffnungskeynote bis zu Networking-Sessions – sei dabei und vernetze dich mit der TYPO3-Community! 🚀
https://t3dd24.typo3.com/schedule

derickr,
@derickr@phpc.social avatar

@SecondeJ kicking off tonight's PHP London meeting.

sarah,
@sarah@phpc.social avatar

Here are my top 5 favorite Composer packages in (in no particular order):

  1. mezzio/*
  2. psr/*
  3. monolog/monolog
  4. league/flysystem
  5. symfony/console

There are many others I love but I find myself using these on most if not all projects.

typo3, German
@typo3@typo3.social avatar

🚀 The schedule is here! With 40+ speakers and innovative first-time talks, this event is set to be amazing. Topics include extension development, frontend trends, AI, and more. Join us and get smarter for the future!

Check out the full schedule: https://t3dd24.typo3.com/schedule

wowa_TYPO3, German
@wowa_TYPO3@techhub.social avatar

Heute Abend um 19:30 Uhr ist es wieder soweit: auf Twitch! 🌐 Erfahre alles über die neuesten Entwicklungen in TYPO3, teste Extensions live mit mir und stelle deine Fragen direkt im Stream. Sei dabei und tauche in die TYPO3-Welt ein!

🔗 https://twitch.tv/wowa_typo3

sarah,
@sarah@phpc.social avatar

I have used #php for over twenty years. I know it’s power and I’ve seen it mature as a first class language.

Haters will hate. But PHP is one of the most powerful and versatile languages in the world.

From CLI to web and everything in between, PHP can do it. You can and should feel good about choosing PHP for your project.

SuitedUpDev,
@SuitedUpDev@mastodon.online avatar

A quick question to my fellow #PHP developers here. Does anybody have a suggestion for Spider / crawler library in PHP?

SuitedUpDev,
@SuitedUpDev@mastodon.online avatar

I wanna crawl some domains under a certain TLD and keep track how much "outgoing" links are being referenced on the domains.

mobileatom,
@mobileatom@flipboard.com avatar

Understanding continuous profiling: part 2. #PHP #ContinuousProfiling

https://www.blackfire.io/?utm_source=flipboard&utm_medium=activitypub

Posted into SYMFONY FOR THE DEVIL @symfony

mobileatom,
@mobileatom@flipboard.com avatar
sarah,
@sarah@phpc.social avatar

I'm offering a FREE copy of my book, Mastering Object-Oriented PHP, to all members of the community. It's my way of giving back. Grab your copy at https://masteringobjectorientedphp.com today.

typo3, German
@typo3@typo3.social avatar

Welcome to the , Telekom MMS! 🧡

Since 2006, they have worked with and joined the as a Gold Member. Now as a , they elevate their contribution to new heights.

🌐 https://www.telekom-mms.com/

Excited to have you on board! 🤝

image/png
image/png

wowa_TYPO3, German
@wowa_TYPO3@techhub.social avatar

Nicht vergessen, heute Abend TYPO3 Usergroup Bodensee Online-Meeting!

Thema: TYPO3 Basics: Integrate testing with typo3/testing-framework

Anmeldung: https://events.teams.microsoft.com/event/69cf5cc0-645d-4f47-92fe-c58f0294851e@fafe1fa9-5ed6-4dfd-ba88-e4bde9d028d0

mikestreety,
@mikestreety@hachyderm.io avatar

@wowa_TYPO3 Do you know if this will be recorded & available to watch after?

wowa_TYPO3,
@wowa_TYPO3@techhub.social avatar

@mikestreety Sorry, I don't know. I think if the speaker agrees, it could be possible.

ProvenPudding,
@ProvenPudding@fosstodon.org avatar

🗓️

Monday+Tuesday: Community Sprint ( 🇩🇪 )

Wednesday: ( 🇳🇱 )

Friday+Saturday: ( 🇮🇹 )

ProvenPudding,
@ProvenPudding@fosstodon.org avatar

DrupalJam will be my big on-stage day, with both a talk and a podium discussion. 📣 🎭 🍿

https://drupaljam.nl/sessions/defend-foss-we-need-remind-world-what-were-about

https://drupaljam.nl/sessions/past-present-and-future-open-source

Crell,
@Crell@phpc.social avatar

I've just tagged a new release of Crell/Serde, version 1.2.

This release includes support for Unix timestamps, makes TypeFields more flexible and customizable, and fixes an issue with handling null values. Note that the latter fix has a very small BC break that only impacts a select number of custom Importers, so odds are you won't notice.

Get it while it's hot!

https://github.com/Crell/Serde

sarah,
@sarah@phpc.social avatar

The language is incredibly powerful. It’s great for many things. But not everything.

I wouldn’t write a web server in PHP and deploy it to production.

But the fact that I could makes the language incredibly powerful.

thgs,
@thgs@phpc.social avatar

@sarah not booting everything every time can be quite performant though

ramsey,
@ramsey@phpc.social avatar

@sarah It does have a JIT, now, and the JIT is getting better in 8.4, so it’s not so far fetched to consider long-running, single-threaded processes written in .

donatj,
@donatj@mastodon.social avatar

In it would be nice if UnhandledMatchError contained the unmatched item.

derickr,
@derickr@phpc.social avatar

@donatj you mean in the error message?

alexanderschnitzler, German
@alexanderschnitzler@mstdn.social avatar

Zum ersten mal Sentry Performance für eine PHP-App konfiguriert, mit Query-Analyse etc.

Ganz schön mächtig, das Ganze!

Geht mit ein paar Hacks tatsächlich sehr gut in da man sich durch Request-Middleware und DBAL-Middleware super überall hereinhängen kann.

Zudem dann noch ein paar Breadcrumbs eingebaut und schon ist man deutlich schlauer was so abgeht auf der Seite.

alexanderschnitzler,
@alexanderschnitzler@mstdn.social avatar

@cybersmog @t3muc Lust schon aber keine Zeit. Ich habe Zeit für bezahlte Arbeit oder Familie. Wenn sich das mal wieder ändert, dann ja.

supergarv,
@supergarv@phpc.social avatar

@kanti Cooles Ding!!

flavioheleno,
@flavioheleno@phpc.social avatar

would you like to run your for all available Releases but forgets to update it whenever new versions are available? Try my latest action to improve your build matrix: https://github.com/flavioheleno/php-active-releases-action

ramsey, (edited )
@ramsey@phpc.social avatar

I haven’t said it in a while, but I want to make sure everyone knows that I really appreciate what @eric and @john are doing at @phparch. I think the work they’re doing is awesome!

You should check out @phparch.

(No one is paying me for this promotion, nor have I been asked to do this.)

ramsey,
@ramsey@phpc.social avatar

@lewiscowles1986 @eric @john @phparch I’m not sure what this means.

lewiscowles1986,
@lewiscowles1986@phpc.social avatar

@ramsey @eric @john @phparch
It was positive. I Always see you promoting PHP Ugly, PHP Arch is a view onto a way to develop with PHP.

I'll take compliments off my LinkedIn 😂😢

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