Welcome Guest, Not a member yet? Register   Sign In
How to support PHP8?
#1

I noticed that we have a lot of multi-type parameters in our code.
Whether to upgrade directly in the current version or recreate a new Codeigniter for transformation.

https://wiki.php.net/todo/php80
Reply
#2

Adding multi-type to function(s) will break backwards compatibility with PHP 7.x and won't most likely be added in the near future.
Reply
#3

(06-23-2020, 09:59 AM)jreklund Wrote: Adding multi-type to function(s) will break backwards compatibility with PHP 7.x and won't most likely be added in the near future.
The last time I updated https://ci4-strict.tk there was only one problem required to make the complete framework add multi-type parameters to functions. The online demo  also uses MySqli from the Playground.

The Github source has a file that "declare(strict_types=1);" to both system and public folder source files that only takes a second to add to about 400 files.

The converted system files can safely be used in your own projects and strict parameter typing only takes effect when strictly typing is declared in your own project. An added bonus is that the PHP cunningly programmed strict type to only affect the calling file. This feature is to ensure legacy libraries are not affected! 

This is a cunning feature because it is different to using error_reporting and declaring ini_set display errors that apply to all included and required files.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB