Skip to content

WebCheatSheet

The easy way to know

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

Author: Sergey Kornilov

SQL

Recover SQL Server tempdb After an Azure VM Restart

Sergey KornilovOctober 30, 2026

Verify the tempdb file paths, recreate the Azure ephemeral-disk folder and permissions, and start SQL Server only after the disk is ready.

SQL

Diagnose SQL Server Merge Replication Rollback Errors

Sergey KornilovOctober 30, 2026

Capture the Merge Agent output and locate the first database error instead of treating the final rollback message as the root cause.

PHP

Fix PHP array_map(): Argument #2 Must Be an Array

Sergey KornilovOctober 30, 2026

Validate and normalize incoming PHP values before passing them to array_map instead of letting a string reach the array parameter.

PHP

Pass Private PHP Methods as Callbacks Safely

Sergey KornilovOctober 28, 2026

Create a Closure for a private method inside its class scope before passing it to external callback consumers.

PHP

Find Failed Transfers in PHP cURL Multi

Sergey KornilovOctober 28, 2026

Read each completed cURL multi message to find its transfer result instead of relying on the multi-handle error code.

PHP

Read SQLSTATE and Driver Errors from PDOException

Sergey KornilovOctober 28, 2026

Treat PDOException codes as SQLSTATE strings and use errorInfo for the database driver code and diagnostic message.

PHP

Understand Error, Exception, and Throwable in PHP

Sergey KornilovOctober 27, 2026

Distinguish PHP Error and Exception objects, catch expected failures specifically, and reserve Throwable for application boundaries.

PHP

Choose ENT_SUBSTITUTE and ENT_DISALLOWED in PHP

Sergey KornilovOctober 27, 2026

Use PHP HTML escaping flags deliberately to replace malformed UTF-8 and document-type-disallowed code points without hiding input problems.

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.

Posts navigation

Older posts
Newer posts

Recent Posts

  • Fix Invalid Regex Escapes After Moving to PHP 8
  • Handle Invalid Read Lengths in PHP File Functions
  • Resolve DbUp Hotfix Migration Conflicts in SQL Server
  • Distinguish PHP stream_select Timeouts from Readable Streams
  • Set UTF-8 Output for a PHP gettext Domain

Recent Comments

  1. Fix Invalid Regex Escapes After Moving to PHP 8 - WebCheatSheet on PHP Regular Expressions: preg_match, Replace, Split, and Grep
  2. Set UTF-8 Output for a PHP gettext Domain - WebCheatSheet on PHP Variables, Types, and Scope
  3. Combine CSV Columns into an RDF Literal with CSVW - WebCheatSheet on Create Word, Excel, and CSV Files with PHP
  4. Replace Curly Brace String Offsets in PHP 8 - WebCheatSheet on PHP Variables, Types, and Scope
  5. Fix PHP set_error_handler Callbacks with Five Parameters - WebCheatSheet on PHP Functions: Parameters, Return Types, and Scope

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.