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
+103
+1
14.3k Members
+57
Contact

Pinned content

View all 3 collections

PHP admins have deemed these posts noteworthy.

Pinned
32 votes
8k views
Collection

Common Mistakes to Avoid in PHP

A list of real issues most beginners encounter when using PHP.
Sasha's user avatar
  • 101
Pinned
58 votes
5k 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

Can you answer these questions?

View all unanswered questions

These questions still don't have an answer

0 votes
0 answers
8 views

Drupal config sync but database drifting, how to automate 'database migration'?

I am using drupal11. Specifically, I am using the paragrpahs module where on fresh install of the module it will create the module related entity tables in the database. Then I export my config ...
0 votes
0 answers
14 views

Opencart how can i remove query in seo link

<?php namespace Opencart\Catalog\Controller\Startup; /** * Class SeoUrl * * @package Opencart\Catalog\Controller\Startup */ class SeoUrl extends \Opencart\System\Engine\Controller { /** ...
-1 votes
0 answers
17 views

after form submission 404 error coming in wordpress

Hi I have created a form function code inside a theme functions.php file my file is https://example.com/counsellor-registration/ which is showing html layout of form when i open this link . problem is ...
0 votes
0 answers
49 views

Sending a 9MB JSON file takes 3 seconds

I have to provide data from a MySQL database, so I'm extracting that data with a traditional PHP/MySQL prepared statement, turning it into JSON with json_encode and echoing it. This takes almost three ...
0 votes
0 answers
34 views

Automatically change user role after completed orders in WooCommerce

I'm using code that gives the user a new role after three orders. The default user role is “Customer” and I have created an additional role “Regular Customer”. /* Create a new role */ add_action('init'...

Learn something new
These are the most recent articles in PHP Collective
0 votes
41 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
2 votes
553 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
9 votes
2k views
1 minute read
How-to guide

How to trim &nbsp; (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
58 votes
5k 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