• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

SomeDevTips

Tips and code examples for software developers

  • WordPress
  • PHP

PHP

Dev tips about PHP programming, including some quirks and pitfalls of the language you should be aware of.

A local development environment for web applications

30 April 2022. Categories: PHP| Web| WordPress

I created a LAMP (Linux-Apache-MySQL-PHP) local development environment you can use to develop your web applications. It is a docker environment. Docker allows you to separate your development environment from your host computer. The web server and the database server are not installed on your host computer. They run in isolation inside your docker containers, […]

Sorting a PHP array: all the ways to do it

23 August 2019. Categories: PHP

This article explains all the ways to sort a PHP array. I start with the base sort function, then I explain the possible variations of that basic function. Then I talk about the natural sort, the user-defined sort and the sort options. Finally I show you some pitfalls you should pay attention to.

Merge two PHP arrays: use array_merge or + operator?

27 July 2019. Categories: PHP| Web

How you can merge two PHP arrays: with the array_merge function or the + operator. These two methods can lead to very different results, depending on the the keys of the two arrays, if they are strings or numbers. Understanding the differences is very important to avoid unexpected results. With examples.

Primary Sidebar

Recent articles

  • WordPress: let an author manage categories and tags
  • A local development environment for web applications
  • Stacks and queues: features
  • A simple backup script for WordPress
  • Git: how to change the remote repository of a project

Categories

  • Algorithms and data structures
  • PHP
  • Version control
  • Web
  • WordPress

© Copyright 2019-2023 · Somedevtips