John Cox

Blogs · @wyome

Tagged programming · everything

My Collection of PHP Performance Benchmarks

This appears to be a benchmarking tool rather than an article to summarize. It's a collection of PHP performance microbenchmarks comparing different methods for common string and array operations (checking if strings are empty, comparing strings, searching within strings, etc.), with execution times measured in milliseconds. The author emphasizes that these are microbenchmarks with limited real-world applicability, and provides practical conclusions like preferring `===` over `==` for comparisons, using `strlen()` to detect the string '0', and choosing `strpos()` for substring searches.

Permalink

Understanding the Principles of Algorithm Design | Nettuts+

An algorithm is a set of step-by-step instructions for completing a task efficiently—not just any function, but one designed with optimization in mind, like binary search completing in seconds what brute-force searching might take years to do. The article explains how algorithms power major tech companies and provides practical principles for everyday developers: understanding your input, knowing how your tools work under the hood, grasping how your code interacts with the larger system, and systematically reducing unnecessary operations through caching, loop optimization, and clever techniques like divide-and-conquer. Becoming proficient requires consistent study and practice with algorithm challenges to build intuition for writing performant code.

Permalink

PHP: Hypertext Preprocessor

The State of PHP Survey (25 Aug 2026) invites PHP developers to share their experiences and priorities in a 15-minute survey run by The PHP Foundation and JetBrains, with results to be published as an anonymized report later in 2026 and the raw dataset released for community analysis.

Permalink

Untitled (http://blog.bittersweetryan.com/2012/09/jquery-function-of-week-deferred-deep.html?spref=tw)

jQuery's Deferred object provides a way to manage callbacks for asynchronous operations, working similarly to making a phone call where you register what to do based on whether the call succeeds or fails. The article explains that Deferreds have two parts: callers (functions that initiate operations or respond to results using `when()`, `then()`, `done()`, and `fail()`) and callees (functions that return promises and eventually resolve or reject them). A real-world example demonstrates how using Deferreds to chain operations like fading out content, fetching tweets, and fading in new data keeps code decoupled and maintainable rather than nesting callbacks.

Permalink

AndiSmith.com

# Don't Lose Your Head AI is making people faster at their work, but the piece examines what this speed is costing in terms of decision-making quality and human judgment. It questions whether efficiency gains from AI tools are coming at the expense of thoughtfulness and deliberation.

Permalink

Using jQuery .on() and .off() – AndiSmith.com

jQuery 1.7 introduced `.on()` and `.off()` methods that unify all previous event handling approaches (`.bind()`, `.live()`, `.delegate()`, `.unbind()`, `.die()`, and `.undelegate()`) into a single, more efficient syntax. The `.on()` method attaches event handlers with flexible parameters for specifying event types, target selectors, and data, while `.off()` removes those handlers with matching specificity. The article provides migration guides for converting legacy code patterns to these new methods and introduces `.one()` for single-use event handlers.

Permalink

PHP Best Practices, a short guide for common and confusing PHP tasks

This guide addresses common low-level tasks in PHP where multiple approaches create confusion, offering best practices for issues like password hashing, database connections, and UTF-8 handling. It focuses on PHP 7.2 running on Ubuntu 18.04 LTS and deliberately avoids high-level architectural advice, security deep-dives, or coding style preferences, instead providing introductory solutions with pointers to further research. The author acknowledges PHP's inconsistent history and evolution while attempting to cut through conflicting tutorials by recommending specific approaches—such as using PDO for databases, the DateTime class for dates, and the Multibyte String functions for Unicode text.

Permalink

My first API: Google Weather. Thoughts? : PHP

This is not an article, but rather a Reddit discussion thread about code review feedback for a PHP weather API wrapper library. The commenter "hiii" critiques the original poster's design decisions—arguing that getWeather() should require a location parameter, that setIcons() shouldn't be part of the API since developers can map conditions to icons themselves, and that error handling via displayError() violates separation of concerns by mixing view logic into the library. The original poster incorporates this feedback by removing the default location, eliminating the setIcons() method, and changing error handling to return false instead of printing HTML.

Permalink

Adjacency list vs. nested sets: MySQL | EXPLAIN EXTENDED

MySQL's nested sets model becomes competitive with adjacency lists for hierarchical queries when augmented with spatial R-Tree indexes on a bounding box field, allowing ancestor searches to complete in milliseconds rather than seconds—a performance advantage unavailable in other major database systems. The adjacency list remains faster for retrieving descendants to a certain depth, but requires custom recursive functions due to MySQL's lack of native recursion support, while nested sets updates are expensive and require table locking on MyISAM storage. The choice depends on update frequency: nested sets for read-heavy hierarchies with infrequent structural changes, adjacency lists for scenarios requiring frequent updates or continuous availability.

Permalink

Reference - What does this symbol mean in PHP? - Stack Overflow

PHP's splat operator (...), available since version 5.6, allows functions to accept an arbitrary number of arguments and arrays to be unpacked into function parameters. When used in function definitions, it collects multiple arguments into an array; when used in function calls, it unpacks arrays or associative arrays into individual arguments or named parameters. The operator can also be used multiple times in a single function call and works with type declarations, though variadic parameters cannot themselves be targeted by named arguments—only their individual values when unpacked from associative arrays.

Permalink

How to: Use MySQL fast LOAD DATA for UPDATEs - SoftwareProjects : Internet Marketing Services

This is not a saved article but rather a company website for SoftwareProjects, a platform established in 2003 that provides eCommerce and digital business solutions. The site describes their evolution from a web development agency to a SaaS vendor offering tools like CRM, shopping carts, email marketing, and analytics, with particular focus since 2015 on eCommerce shopping cart functionality. Their pitch emphasizes curated product quality, continuous monitoring of user feedback, 24/7 support across 17 countries, and features like real-time analytics, anti-fraud protection, and affiliate management.

Permalink

20 Great PHP Libraries You Need to Know | KomunitasWeb

La inteligencia artificial está automatizando la corrección de exámenes en instituciones educativas, permitiendo evaluaciones rápidas, objetivas y eficientes que liberan tiempo docente para la enseñanza. El artículo examina cómo esta transformación tecnológica está redefiniendo los procesos de evaluación académica y qué ventajas específicas aporta a la educación contemporánea.

Permalink

Laravel - A Clean & Classy PHP Framework

I can't summarize this content because it's not an article or report—it's a collection of testimonial quotes from various developers and companies about Laravel. There's no argument being made or information being conveyed beyond "these people like Laravel." If you'd like me to summarize an actual article you've saved, please share that instead.

Permalink