Skip to main content
5 votes
3 answers
391 views

We are migrating a legacy PHP application to PHP 8.5. We must also support outdated PHP versions, i.e. before PHP 8.3. I have some code increasing a variable with a letter: $d = 'H'; ++$d; This ...
caiofior's user avatar
  • 561
2 votes
1 answer
206 views

I upgraded a PHP 7 application to PHP 8. The following code was working before, but no longer: $options = [ 'http' => [ 'method' => 'POST', 'header' => "Content-Type: ...
James B. Nall's user avatar
Best practices
0 votes
11 replies
6k views

Edit: How does this recursive call play out, why is i = 1, even though the function fires 3 times ? Doesn't the function reach the if statement -> fires -> (this repeats 3 times) then reaches ...
RDU's user avatar
  • 1,131
1 vote
1 answer
227 views

I'm trying to upgrade my Symfony from 5.4 to 6.4 and PHP from 7.4 to 8.4. I almost did all changes but I'm currently blocked on this exception : Typed property App\Entity\AppRole::$uniqid must not be ...
user21049957's user avatar
2 votes
2 answers
132 views

I have an object which have created property like unix timestamp integer. I try to convert this property to DateTime object and supposed the PHP will set up correct Timezone according application ...
Čamo's user avatar
  • 4,463
2 votes
2 answers
282 views

Going through a code review and found named argument call being used to a argument that uses the spread operator for variable args (vargs). To my suprise it works fine for 1 argument, but I cannot ...
Alex Dawn's user avatar
0 votes
1 answer
72 views

Doing my first steps with php and I am a bit confused. I have written a small script, which should take a POST request with some data, put the data in a formatted email and send it. For this I simply ...
Roland Deschain's user avatar
-3 votes
1 answer
197 views

I'm clearly late to the Null Safe party and trying to catch up. For some reason I can't get my head wrapped around it. I have lots of instances in my PHP code like: if($_POST['submit'] == NULL){ **...
Evan Drury's user avatar
1 vote
0 answers
95 views

I'm running a command with shell_exec from ascii-image-converter (https://github.com/TheZoraiz/ascii-image-converter) which return <?php $cmd = "ascii-image-converter $fichier -s ./assets/...
SoCkEt7's user avatar
  • 2,277
0 votes
0 answers
48 views

I wasn't able to locate a solution to this online, google was not being my friend today. Recently we did a PHP upgrade to 8.3 on our webserver at work, from PHP 5.6.12, which was quite a heavy lift. ...
Shane's user avatar
  • 479
1 vote
2 answers
401 views

I’m working on a PHP script that processes large CSV files (up to 1GB in size) by reading the file, performing some transformations on each row, and then saving the results to a database. My current ...
user avatar
1 vote
0 answers
129 views

I’m currently facing an issue with translating certain fields in my form. The error I’m encountering is: Field 'name' doesn't exist in App\Entity\ModuleTranslation It appears that the system is ...
gLanes's user avatar
  • 41
1 vote
1 answer
115 views

I am upgrading laravel 10 project to version 11. I have upgraded sethphat/eloquent-docs package to v2.0.1 user001@DEV:~/projects/my-project$ composer show sethphat/eloquent-docs name : sethphat/...
Symfony TestMail's user avatar
0 votes
1 answer
82 views

On laravel 10 site I use enums, defined like : namespace App\Enums; ... enum PointsStatusEnum: string { case STATUS_BEGIN = 'B'; ... public static function getCasesArray(): array {...
Petro Gromovo's user avatar
0 votes
1 answer
151 views

this my __construct() method : public function __construct(){ $this->authorizeResource(Event::class, 'event'); } but i have this error: Undefined method 'authorizeResource'. I saw a tutorial ...
Hossein Nazari's user avatar

15 30 50 per page
1
2 3 4 5
42