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
+313
10.8k Members
+134
Contact

Pinned content

View all 3 collections

PHP admins have deemed these posts noteworthy.

Pinned
23 votes
5k 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
44 votes
3k 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

Nginx redirect all urls to route.php

I use php8.2 + nginx 1.26 in macbook M3 chip. I have encountered an error that "[error] 82337#0: *31 kevent() reported about an closed connection (54: connection reset by peer) while reading ...
-1 votes
0 answers
5 views

Unable to parse all kind of subtype while fetching emails with imap from WorkMail

I have done some coding with PHP to fetch emails from WorkMail for each user. Where I am getting each user email and password from another file. This file is only for debugging purposes. This is the ...
0 votes
0 answers
8 views

unable to curl / copy /File_get_contents in php https://www.nation.com.pk/latest

I am using php , and trying to download https://www.nation.com.pk/latest to parse I have tried curl, copy() and file_get_contents(), nothing seems to work from hosting, but i can download it on my ...
0 votes
0 answers
12 views

When I enter the command php artisan install:api, in the terminal I get this error

I'm watching a tutorial to learn laravel, but I ran into this error ERROR There are no commands defined in the "install" namespace. I would appreciate if you could help me I tried to update ...
0 votes
0 answers
6 views

Trouble about upload APK file in Codeigniter 3

I have trouble when i'm upload apk file on codeigniter 3, My Controller: public function save_data_apk(){ $config['upload_path'] = './upload_apk_file/'; $config['allowed_types'] = 'apk'; $...

Looking for an extra challenge?

View all bountied questions

These questions have a bounty on them

1 vote
0 answers
110 views
+50

Change password on ESXi with REST API

I am trying to write a script in PHP that resets the root password on an ESXi ("myhost", moId="host-15458") registered to a VCSA version 8.0.2 ("myvCenter", API-Id=8.0.2....

Learn something new
These are the most recent articles in PHP Collective
3 votes
201 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
21 votes
56k 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
44 votes
3k 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