
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 26504 Articles for Server Side Programming

292 Views
Preg_replace_callback_array() function in PHP 7 represents a regular expression and replaces the use of callbacks. This function returns a string or an array of strings to match a set of regular expressions and replaces them using a callback function.Syntaxpreg_replace_callback_array(patterns, input, limit, count)Parameter Values:pattern − It requires an associate array to associate the regular expression patterns to callback functions.input/subject −It requires an array of strings to perform replacements.limit −It is optional. -1 is used for default, which means it is unlimited. It sets a limit to how many replacements can be done in each string.count −It is also optional like the ... Read More

482 Views
The concept of generator is not new to PHP 7, because it was available in the earlier versions too. With generators, implementation becomes easy without the overhead of implementing a class that implements the iterator interface. With the help of a generator, we can write foreach code without using an array in memory. It also helps to eliminate the “exceed memory limit errors”.With the help of generator delegation in PHP 7, we can delegate to another generator automatically. It also allows arrays and objects that implement the traversable interface.Generator delegation Example 1Live Demo PHP 7 : Tutorialpoint ... Read More

392 Views
In the previous versions of PHP, generator functions were not able to return expressions, but from the PHP 5.5, generator return expression is added in the existing one. By using generator return expressions, it is easy to use the return statement within a generator and, it also returns the value of the final expression.By using the generator return expression, we can only return the value of the expression but cannot return the reference. By using the new Generator::getReturn() method, we can fetch the value which can be used once the generator function has finished yielding the defined values.Using PHP 7 ... Read More

257 Views
PHP 7 uses three different types of Group Use declarations −Non-mixed-use declarationsMixed-use declarationsCompound use declarationsNon-mixed-use declarations:Non-mixed-use declaration means we do not use the classes, functions, and constructs in a single statement. Or, we can say that when we declare classes, functions, and constants separately using a use statement. It is called Non-mixed group use declarations.Exampleuse Publishers\Packt\{ Book, Ebook, Video, Presentation }; use function Publishers\Packt\{ getBook, saveBook }; use const Publishers\Packt\{ COUNT, KEY };Mixed group use declarationsWhen we combine the PHP class, function and constants in a single-use statement, it is called a mixed group use declaration.Exampleuse Publishers\Packt\ { Book, ... Read More

363 Views
When it is required to remove duplicates from a circular linked list, a 'Node' class needs to be created. In this class, there are two attributes, the data that is present in the node, and the access to the next node of the linked list.In a circular linked list, the head and the rear are adjacent to each other. They are connected to form a circle, and don't have 'NULL' value in the last node.Another class needs to be created that would have an initialization function, and the head of the node would be initialized to 'None'. Multiple methods are defined ... Read More

357 Views
When it is required to insert a new node at the middle of the circular linked list, a 'Node' class needs to be created. In this class, there are two attributes, the data that is present in the node, and the access to the next node of the linked list.In a circular linked list, the head and the rear are adjacent to each other. They are connected to form a circle, and don't have 'NULL' value in the last node.Another class needs to be created that would have an initialization function, and the head of the node would be initialized ... Read More

459 Views
When it is required to insert a new node at the end of the circular linked list, a 'Node' class needs to be created. In this class, there are two attributes, the data that is present in the node, and the access to the next node of the linked list.In a circular linked list, the head and the rear are adjacent to each other. They are connected to form a circle, and don't have 'NULL' value in the last node.Another class needs to be created that would have an initialization function, and the head of the node would be initialized ... Read More

616 Views
When it is required to insert a new node at the beginning of a circular linked list, a 'Node' class needs to be created. In this class, there are two attributes, the data that is present in the node, and the access to the next node of the linked list.In a circular linked list, the head and the rear are adjacent to each other. They are connected to form a circle, and don't have 'NULL' value in the last node.Another class needs to be created that would have an initialization function, and the head of the node would be initialized ... Read More

321 Views
When it is required to find the maximum and minimum node values from a circular linked list, a 'Node' class needs to be created. In this class, there are two attributes, the data that is present in the node, and the access to the next node of the linked list.In a circular linked list, the head and the rear are adjacent to each other. They are connected to form a circle, and don't have 'NULL' value in the last node.Another class needs to be created that would have an initialization function, and the head of the node would be initialized ... Read More

215 Views
When it is required to delete a node from the middle of the circular linked list, a 'Node' class needs to be created. In this class, there are two attributes, the data that is present in the node, and the access to the next node of the linked list.In a circular linked list, the head and the rear are adjacent to each other. They are connected to form a circle, and don't have 'NULL' value in the last node.Another class needs to be created that would have an initialization function, and the head of the node would be initialized to ... Read More