PHP logic to reverse a string

<?php// Function to reverse a given stringfunction reverseText($text) { // Get the length of the input text $textLength = strlen($text); // Initialize an empty array to hold characters in reverse …

Laravel PHP commands

Install Composer, run the following script in your terminal:# curl -sS https://getcomposer.org/installer | sudo php — –install-dir=/usr/local/bin –filename=composer Install the Laravel CLI globally, run the following Composer command:# composer global …

Naming conventions – PHP

Here are the suggested naming conventions for Variables, Classes, Functions and Files. Naming Variables Use all lower case. Use _ to separate words, e.g. $green_color_value Use descriptive names (except loop …

Best coding Practices – PHP

Never put phpinfo() in the root directory Assignments in arrays may be aligned. When splitting array definitions onto several lines, the last value may also have a trailing comma. Never …

Compile time & run time

Q1. Difference between Run time and compile time? A: To become an executable program, source code should be compiled into machine code. This compilation process is known as compile time. …

Magento

Q1. Explain Magento’s MVC architecture? Q2. What is EAV in Magento? Q3. How Magento ORM works? A: ORM stands for Object Relational Mapping. It is programming technique used to convert …

CodeIgniter

Q1. What are the features of codeigniter? Q2. Explain MVC in Codeigniter? Q3: What are the hooks in codeigniter? A: Hooks provides a means to tap into and modify the …