Promises and Async Flow in JavaScript
What Promises are in JavaScript, how to escape callback hell, and the essential patterns for chaining then/catch and managing async flow.
Category
Features, syntax and practices of the PHP, JavaScript, TypeScript, Go and Python languages, with release notes and worked examples. (Page 7/9)
This category has 49 posts.
What Promises are in JavaScript, how to escape callback hell, and the essential patterns for chaining then/catch and managing async flow.
What closures (anonymous functions) are in PHP, how variable capture with the use keyword works, and practical everyday examples.
PHP 7.1's nullable types and void return type make function signatures more readable and precise, so one glance shows whether a function can return null.
How I use interface definitions and dependency injection in PHP to build loosely coupled classes, illustrated with practical examples.
How I apply SRP, the S in SOLID, to PHP classes with concrete examples, moving beyond abstract theory and asking where it is reasonable to stop splitting.
A practical look at how I use the scalar type declarations and return types introduced in PHP 7, including what strict_types mode changes in practice.