CodeIgniter Forums
PHP 8 - Arrays, Variables, Operators, Exception Handling and More - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1)
+--- Forum: Lounge (https://forum.codeigniter.com/forumdisplay.php?fid=3)
+--- Thread: PHP 8 - Arrays, Variables, Operators, Exception Handling and More (/showthread.php?tid=86732)



PHP 8 - Arrays, Variables, Operators, Exception Handling and More - InsiteFX - 02-14-2023

PHP 8 - Arrays, Variables, Operators, Exception Handling and More


RE: PHP 8 - Arrays, Variables, Operators, Exception Handling and More - captain-sensible - 02-14-2023

Your post os about php 8. One good (or bad thing about being on Arch Linux is that, they do seem to insist on having everything the latest) so my php is 8.2.2



since the post is about php 8.0 i'm going to add an issue that has come up with 4.2.10 codeigniter and php :

Code:
PHP 8.2.2 (cli) (built: Feb  1 2023 08:33:04) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.2, Copyright (c) Zend Technologies

on my local dev , suddendly i got this
Code:
ErrorException
Creation of dynamic property App\Controllers\Pages::$myDate is deprecated

i've made a quick fix using as a declaration before a class
Code:
#[\AllowDynamicProperties]

and if necessary a declaration before class method

Code:
#[\ReturnTypeWillChange]

its something to do with what will be coming with php 9