Schrank, 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, avatar

@Schrank ?? 'default'

derickr, avatar

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


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

lewiscowles1986, avatar

@derickr @rasmus happy birthday

derickr, avatar

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

kubikpixel, 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


martijn, 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, avatar

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

Skoop, avatar

I wrote something about making the choice between upgrading or upgrading:

Skoop, avatar

@ralphschindler Laravel Shift seems to be Rector on steroids?

ralphschindler, 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, 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, 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, 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, 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, avatar

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


@ramsey keep in mind that there is also memory_reset_peak_usage(). Take a look at how these functions behave here:

wowa_TYPO3, German 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! 🚀

derickr, avatar

@SecondeJ kicking off tonight's PHP London meeting.

sarah, 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 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:

wowa_TYPO3, German 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!


sarah, 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, avatar

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

SuitedUpDev, avatar

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

mobileatom, avatar

Understanding continuous profiling: part 2. #PHP #ContinuousProfiling

Posted into SYMFONY FOR THE DEVIL @symfony

mobileatom, avatar
  • 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