Welcome Guest, Not a member yet? Register   Sign In
PHP 8 - Arrays, Variables, Operators, Exception Handling and More
#1

PHP 8 - Arrays, Variables, Operators, Exception Handling and More
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#2

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
CMS CI4     I use Arch Linux by the way 

Reply




Theme © iAndrew 2016 - Forum software by © MyBB