Skip to content

WebCheatSheet

The easy way to know

  • PHP
  • HTML
  • JavaScript
  • SQL
  • ASP
  • MS Access Functions
  • SaaS
  • Email
PHP

Iterate SimpleXML Safely Before Calling key()

Sergey KornilovOctober 27, 2026

Initialize a SimpleXML iterator before reading its key, or let foreach manage rewind, validity checks, and movement automatically.

PHP

Avoid Returning from PHP finally Blocks

Sergey KornilovOctober 26, 2026

Keep PHP finally blocks limited to cleanup so they do not replace a return value or suppress an exception already in flight.

PHP

Use Named Arguments with PHP Variadic Parameters

Sergey KornilovOctober 26, 2026

Understand how PHP stores named arguments in a variadic array and choose named or positional calls based on whether keys matter.

PHP

Handle Invalid UTF-8 with PHP grapheme_strlen()

Sergey KornilovOctober 26, 2026

Check the result of grapheme_strlen(), report ICU failures safely, and distinguish grapheme clusters from bytes and code points.

PHP

Validate Boolean Input with PHP filter_var() Correctly

Sergey KornilovOctober 25, 2026

Distinguish valid false values from invalid input when using FILTER_VALIDATE_BOOLEAN and FILTER_NULL_ON_FAILURE in PHP.

PHP

Handle Empty Arrays Before Calling PHP min() or max()

Sergey KornilovOctober 25, 2026

Prevent PHP ValueError exceptions by defining how an empty data set should behave before calling min() or max().

SQL

Diagnose MySQL Latency Before Archiving Old Rows

Sergey KornilovOctober 25, 2026

Measure expensive statements, execution plans, and lock waits before assuming that archiving old MySQL rows will fix application latency.

PHP

Validate TCP Port Numbers Before Opening PHP Sockets

Sergey KornilovOctober 24, 2026

Validate TCP ports as integers from 1 through 65535 before passing them to fsockopen() or stream_socket_client().

PHP

Avoid array_walk() Errors on PHP Readonly Array Properties

Sergey KornilovOctober 24, 2026

Avoid readonly-property errors when array_walk() receives a PHP array property by reference, using foreach or a local copy instead.

JavaScript

Use a Barcode Scanner with a Web App as Keyboard Input

Sergey KornilovOctober 24, 2026

Capture USB or Bluetooth barcode scans in a web form, submit them with Fetch, and prevent duplicate attendance records on the server.

Posts navigation

Older posts
Newer posts

Recent Posts

  • Handle PHP 8.5 SNMP ValueError Separately from Network Failure
  • Explain Why PolarDB Storage Exceeds MySQL Table Size
  • Fix Gutenberg Blob Worker and iframe CSP Errors in Nginx
  • Install SQLSRV for PHP 8.1 with a Compatible Driver Version
  • Remove UNSIGNED When Changing a MySQL Integer Column to VARCHAR

Recent Comments

  1. Explain Why PolarDB Storage Exceeds MySQL Table Size - WebCheatSheet on Get the Size of Every MySQL Database and Table
  2. Install SQLSRV for PHP 8.1 with a Compatible Driver Version - WebCheatSheet on Install and Configure PHP on Windows
  3. Build Accessible Tabs with JavaScript - WebCheatSheet on JavaScript Functions
  4. Remove SQL Server STX Characters before FOR XML – WebCheatSheet on Export a MySQL Database Schema as XML with PHP
  5. Parse Untrusted XML Safely with PHP XMLReader – WebCheatSheet on Export a MySQL Database Schema as XML with PHP

Archives

  • November 2026
  • October 2026
  • September 2026
  • August 2026
  • October 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022

Categories

  • ASP
  • Email
  • HTML
  • JavaScript
  • MS Access Functions
  • PHP
  • SaaS Architecture
  • SQL
  • Uncategorized
Copyright © 2026 WebCheatSheetFresh News by Ascendoor | Powered by WordPress.