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
+36
16k Members
+58
Contact

Pinned content

View all 3 collections

PHP admins have deemed these posts noteworthy.

Pinned
35 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
Pinned
62 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

Can you answer these questions?

View all unanswered questions

These questions still don't have an answer

0 votes
0 answers
6 views

Can Extjs > v7.0 use is WITHOUT install sencha or anything?

My project is using Extjs which call it as simple as like <script type="text/javascript" src="<?php echo base_url(); ?>public/assets/extjs4.2/shared/include-ext.js"><...
0 votes
0 answers
13 views

Azure App Service (PHP 7.x) showing “No Request” after cloning, both original and cloned apps not responding

I have a PHP 7.x web app hosted on Azure App Service. It was running perfectly fine until I used the "Clone App" option in the Azure Portal to duplicate it within the same resource group and ...
0 votes
0 answers
23 views

how to make a html contact form send message using html

I'm currently doing a project that involves making a contact form for a website. I would like to know how can I make the form send the message to the recipient using html and php. the php code also ...
0 votes
0 answers
27 views

Symfony UX LiveComponent file upload works only on first request

I’m having trouble with file uploads in Symfony UX LiveComponent. I’m using Symfony 7.2, Symfony UX 2.x, and PHP 8.2. The problem I have a LiveComponent form that includes a file upload field. On the ...
1 vote
0 answers
43 views

Doctrine referenceone gives only superclass

I'm refactoring old symfony 3 and doctrine 1.3 project; I have 2 classes in same table: Journal and Conference mapped by their same parent Periodic. /** * @ODM\Document(collection="periodics&...

Looking for an extra challenge?

View all bountied questions

These questions have a bounty on them

2 votes
1 answer
183 views
+250

Why do my POST operations on a subresource update the same entry instead of creating new ones?

I am unable to get subresource POST operations working as expected in API Platform 4.1 with subresources; top-level resources work fine. Expected: new subresources can be created as needed. Actual: ...
0 votes
0 answers
57 views
+100

How to run tests of the same phpunit testcase class in parallel with ParaTest?

I have a contrived test case showcasing how multiple test cases can slow the entire execution time down, as even though each is quick on its own, they add up if waited for before executing the next. I ...

Learn something new
These are the most recent articles in PHP Collective
3 votes
378 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
948 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
11 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
62 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