Tag

Callbacks

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Nov 12, 2024 · Backend Development

Function Object Programming (FOP) and Its Alternatives in PHP

The article explains Function Object Programming (FOP) in PHP, outlines its drawbacks, and presents alternative approaches such as anonymous functions, class methods, and closures with code examples, concluding with practical usage scenarios and guidance on choosing the most suitable method.

Anonymous FunctionsCallbacksClosures
0 likes · 4 min read
Function Object Programming (FOP) and Its Alternatives in PHP
php中文网 Courses
php中文网 Courses
May 24, 2024 · Backend Development

Using array_reduce() in PHP: Syntax, Parameters, and Practical Examples

This article explains PHP's array_reduce() function, detailing its syntax and parameters, and demonstrates its usage through three examples: summing numbers, concatenating strings, and calculating product, helping beginners understand how to reduce arrays to a single value with callbacks.

CallbacksPHParray-manipulation
0 likes · 4 min read
Using array_reduce() in PHP: Syntax, Parameters, and Practical Examples
37 Interactive Technology Team
37 Interactive Technology Team
Feb 21, 2024 · Fundamentals

Deconstructing Asynchronous Programming

The article breaks down modern asynchronous programming by examining four core models—callbacks, Promises, reactive observer patterns, and message‑driven architectures—explaining their mechanics, pros and cons, and providing JavaScript/Dart examples and system diagrams to help developers master non‑blocking concurrency.

Async/AwaitAsynchronous ProgrammingCallbacks
0 likes · 26 min read
Deconstructing Asynchronous Programming
php中文网 Courses
php中文网 Courses
Oct 26, 2023 · Backend Development

Understanding Anonymous Functions in PHP: Syntax, Use Cases, and Benefits

This article explains what PHP anonymous functions are, shows their concise syntax, demonstrates typical use cases such as callbacks and closures with code examples, and outlines their advantages like brevity, flexibility, and the ability to capture external variables.

Anonymous FunctionsCallbacksClosures
0 likes · 8 min read
Understanding Anonymous Functions in PHP: Syntax, Use Cases, and Benefits
ByteFE
ByteFE
Apr 29, 2021 · Frontend Development

Avoid Using Functions as Callbacks Unless They Are Designed for It – Common Pitfalls in JavaScript and TypeScript

The article explains how using functions that were not intended as callbacks—such as library utilities, Web APIs, or option objects—can break when array.map or other higher‑order functions pass extra arguments, and it shows safer patterns, TypeScript behavior, and linting hints to prevent these bugs.

CallbacksJavaScriptTypeScript
0 likes · 12 min read
Avoid Using Functions as Callbacks Unless They Are Designed for It – Common Pitfalls in JavaScript and TypeScript
php中文网 Courses
php中文网 Courses
Apr 19, 2021 · Backend Development

Using Anonymous Functions (Closures) in PHP: Examples and Techniques

This article explains PHP anonymous functions (closures), demonstrating how to reference local variables with the use keyword, embed anonymous functions within regular functions, return them, pass parameters, and use them as arguments, accompanied by clear code examples.

Anonymous FunctionsCallbacksClosures
0 likes · 2 min read
Using Anonymous Functions (Closures) in PHP: Examples and Techniques