• What are Constants and How to Define Them in PHP?

    What are Constants and How to Define Them in PHP?

    Sometimes in our code, we want to define variables with values that cannot be changed or defined during the execution of the script. For that purpose, we can use constants.Bare in mind that constants are case-sensitive and when declaring them are always uppercase. !!! Prior to PHP 8.0.0, when defining constants with define() function, they…

  • What Is The Difference Between ECHO and PRINT in PHP?

    What Is The Difference Between ECHO and PRINT in PHP?

    By now, if you are working with PHP, I’m sure that you encountered using echo and print. But do you know the differences between them and are there any differences between them? In this article we will take a look at echo and print, compare them and explain its features. Table of Contents In PHP,…

  • This is the Intro You Need to Start With PHP

    This is the Intro You Need to Start With PHP

    What is PHP and a little history behind it PHP is a recursive acronym that stands for PHP: Hypertext Preprocessor. First version of PHP was released in 1994 by Rasmus Lerdorf. PHP is a open source server scripting language that is widely used. It can be used to manage dynamic content, databases, session tracking, build…

  • How to Write Comments in PHP

    How to Write Comments in PHP

    Comments in PHP helps you organize your code and explain some parts of the code to a fellow developer who might be reading it for the first time, or maybe after some time has passed you want to get back at you code and review it. A comment in PHP is not executed, it’s only…

  • How to Quickly and Easily Install Composer

    How to Quickly and Easily Install Composer

    Composer is a dependency management tool made for PHP. It allows users to manage and integrate external dependencies and libraries. Using Composer in your project makes the software development process much more efficient. It manages packages or libraries on a per-project basis, installing them in a special folder ‘vendor’. Some packages can depend on other…

  • Carbon – The Only API You Need Handling Date and Time

    Carbon – The Only API You Need Handling Date and Time

    Dealing with date and time in PHP can be frustrating, time consuming and complicated. Adding, subtracting dates, facing formatting issues, dealing with timezones, all can be a lot, especially if just you want a simple task with dates done. Here can help Carbon. Carbon is a simple PHP package that extends the PHP DateTime class…