From 4350852406e9556b63a1df448f225abbd7883651 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 24 Jan 2025 23:08:05 +0000 Subject: [PATCH] Add daily email for 2025-01-18 TypeScript for PHP --- source/_daily_emails/2025-01-18.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 source/_daily_emails/2025-01-18.md diff --git a/source/_daily_emails/2025-01-18.md b/source/_daily_emails/2025-01-18.md new file mode 100644 index 000000000..5f3d8774c --- /dev/null +++ b/source/_daily_emails/2025-01-18.md @@ -0,0 +1,29 @@ +--- +title: TypeScript for PHP +date: 2025-01-18 +permalink: daily/2025/01/18/typescript-php +tags: + - software-development + - php + - static-analysis + - phpstan +cta: ~ +snippet: | + Are static analysis tools the same as TypeScript for PHP? +--- + +During one of Nuno Maduro's live streams, he was speaking about static analysis and PHPStan when either he or someone in the chat said "PHPStan is TypeScript for PHP". + +I thought this was an interesting comparison. + +PHP has types and type checking - the same as TypeScript - but it's only performed when the code is executed. + +TypeScript's build step will run its type checks and identify any errors when compiling the application. + +Static analysis tools do the same for PHP, allowing you to execute the type checks without executing the code. + +The means you can do it from the command line, in an IDE or text editor, or in a CI pipeline. + +[Nuno's follow-up YouTube video][0] is a great one to watch if you want to see static analysis and PHPStan in action! + +[0]: https://www.youtube.com/watch?v=sOQC_-pkMYk