SlingAcademy

PHP

PHP is a popular scripting language for web development. It can create dynamic and interactive web pages by running on the server and sending HTML to the browser. It is free, fast, and flexible,

Traversable interface in PHP: A practical guide

Updated: Jan 11, 2024

Overview The Traversable interface in PHP is fundamental to understanding iteration within the language. It’s an abstract base interface that cannot be implemented alone but ensures that classes that implement either Iterator or......

PHP Resource type: A practical guide

Updated: Jan 11, 2024

Overview The PHP resource type is crucial for working with external resources like database connections, file handles, and image canvas. This guide explores its practical aspects through examples and use-cases. Introduction to PHP......

PHP iterable type: A developer’s guide

Updated: Jan 11, 2024

Overview The iterable pseudo-type was introduced in PHP 7.1. It’s a valuable feature for developers that allows functions to accept both arrays and objects as input, provided that the objects are instances of Traversable, which......

Using PHP Generator: A Practical Guide

Updated: Jan 11, 2024

Overview Generators in PHP provide an easy way to implement simple iterators without the overhead of implementing the Iterator interface. This guide will walk you through using PHP generators to handle iterations more memory......

How to compare 2 objects in PHP

Updated: Jan 11, 2024

Overview Comparing objects in PHP can be a nuanced task, especially considering the difference between object references and the values the objects hold. This tutorial will guide you through various methods to effectively compare......

PHP: How to List All Properties and Methods of an Object

Updated: Jan 11, 2024

Overview In PHP, objects are instances of classes which have properties and methods. At times, it’s necessary to inspect these elements, especially during debugging or dynamic processing. This guide explains how to list all......

Fixing PHP Fatal Error: Call to Undefined Method (3 Solutions)

Updated: Jan 11, 2024

Overview PHP Fatal error: Call to undefined method is an error that PHP developers may encounter at some point. It occurs when you try to call a method on an object or class that does not have the method defined. This article will......