Skip to main content

PHP Collective

A collective where developers working with PHP can learn and connect about the open source scripting language.
1.5m Questions
+31
16.6k Members
+93
Contact

Pinned content

View all 3 collections

PHP admins have deemed these posts noteworthy.

Pinned
64 votes
6k views
2 minute read
How-to guide

Start learning PHP — Useful resources for beginners and advanced

Start learning PHP — Useful resources for beginners and advanced! If you're wondering where to start from learning the PHP language or needing some more knowledge to deep dive into the language, you ...
RB Projects's user avatar
Pinned
38 votes
9k views
Collection

Common Mistakes to Avoid in PHP

A list of real issues most beginners encounter when using PHP.
Sasha's user avatar
  • 101

Can you answer these questions?

View all unanswered questions

These questions still don't have an answer

0 votes
0 answers
9 views

WooCommerce Hook is not firing and seem to be deprecated

I know it's 2025, and this problem seems to be all over the place, and I've been trying all the recommended solutions, but it seems it's mostly old code. But I don't really know; I'll try to sum it up ...
0 votes
0 answers
40 views

Azure Table PHP Retrieve Latest Data First with Pagination

I am using this: https://github.com/Azure/azure-storage-table-php to insert data to azure table. However, when I retrieve the data, I don’t get the latest entries unless I use a do...while loop, as ...
0 votes
0 answers
55 views

How to install league/csv bundle with Doctrine v3.3 on Symfony?

I am having a problem today installing the league/csv bundle (v9.27) on my Symfony (v7.2) project with doctrine/orm (v3.3)! When I run command php require league/csv, I get this message: Your ...
0 votes
0 answers
80 views

does database chunk() have a memory leak?

In laravel, I have a query that searches thousands of rows in a database, and I trying to compile that into a CSV file. In attempt to reduce memory usage, I get 500 rows at a time and output the CSV. ...
0 votes
0 answers
67 views

Retrieving values ​from 2 tables at the same time in CakePHP 3

I'm developing a small module on CakePHP 3 and I'm currently encountering a small problem that I can't seem to solve. I have two tables: Events and shop_ticket. Events table: I store information ...

Learn something new
These are the most recent articles in PHP Collective
3 votes
492 views
9 minute read
How-to guide

Quick guide to Laravel package development

Contents Introduction Types of packages Characteristics of a package The Laravel package! Components of a Laravel package Example of a Laravel package Creating your Laravel package 1- Package ...
Yousha Aleayoub's user avatar
3 votes
1k views
2 minute read
How-to guide

Properly removing API from Laravel project

Sometimes a development team may decide to remove all API functionality from a Laravel project for various reasons, such as: No longer needing any API, and shifting focus to web application with ...
Yousha Aleayoub's user avatar
12 votes
3k views
1 minute read
How-to guide

How to trim   (or non-breaking space) in PHP?

The main problem is the way trim() function works. One cannot reliably trim a substring using this function, because it takes its second argument as a collection of characters, each of which would be ...
Your Common Sense's user avatar
25 votes
57k views
3 minute read
Knowledge article

Evolution of Type Declarations in PHP

Introduction: PHP, being a dynamically typed language, traditionally allowed flexibility in variable types, providing both advantages and challenges in code maintenance and robustness. However, with ...
alkhatibdev's user avatar
64 votes
6k views
2 minute read
How-to guide

Start learning PHP — Useful resources for beginners and advanced

Start learning PHP — Useful resources for beginners and advanced! If you're wondering where to start from learning the PHP language or needing some more knowledge to deep dive into the language, you ...
RB Projects's user avatar