Skip to content

Tag: php-8

session_start() giving error for session_destroy() in PHP 8

All of a sudden, my custom session handlers’ session’s session_start() is not working. I had to include destroy after upgrading to PHP 8. It isn’t an issue in PHP 7.4. Fatal error: Uncaught ArgumentCountError: Too few arguments to function CBSession::destroy(), 0 passed and exactly 1 expecte…

Migrate to PHP 8.0: Unbinding $this when $this is used

Step by step, I am migrating my project(s) from PHP 7.1 to PHP 8.0. In the official PHP manual, in the subchapter “Deprecated Features” of the chapter “Migrating from PHP 7.3.x to PHP 7.4.x”, I tried to understand the following deprecation description: Unbinding $this when $this is use…

use call_user_func in PHP 8 returns fatal error

I am trying to call a class named ContactController with the function handleContact with call_user_func([ContactController::class, ‘handleContact’]); but got following error: Fatal error: Uncaught Error: Non-static method appcontrollersContactController::handleContact() cannot be called statically…

How to install PHP 8 on XAMPP

I’m trying to update my PHP version to the brand new PHP 8. I have followed simular steps as this tutorial. But now the following error is shown: Notice: I have used a brand new XAMPP instalation version 7.2.33. I can’t find the solution for my issue. Edit It is saying that I need to look into the…

Connection was not established Xdebug 3 with PhpStorm

Good afternoon. When an attempt is made to debug the script on PHP 8, PhpStorm reports that there is no connection with version 3 xdebug. Works with all versions below 3. I tried to change the parameters of xdebug.remote_{host, port} to xdebug.client_{host, port} but also did not help. Answer Xdebug 3 will be…