Jump to content
Samurai Legend

Outdated PHP

Recommended Posts

define('djlk34jlk', true, true); -> Throws an error: PHP Deprecation Notice: define(): Declaration of case-insensitive constants is deprecated (8192)

Now I searched for how to fix it to be honest I just didn't understand on how to fix it

Share this post


Link to post
Share on other sites
10 minutes ago, Dave said:

According to the RFC here: https://wiki.php.net/rfc/case_insensitive_constant_deprecation passing the third parameter as true is what's causing the deprecation error.

You need to just define the constant without the third argument.

<?php define('djlk34jlk', true);

<?php
define('djlk34jlk', true);

 

I forgot define accepted a 3rd arg! Never saw the point in it though.

  • Like 3

Share this post


Link to post
Share on other sites
11 minutes ago, Magictallguy said:

I forgot define accepted a 3rd arg! Never saw the point in it though.

Haha I did my research prior, as I thought you answer was correct too. I never even knew define had a 3rd argument. I just assume everything is case sensitive as I work between Mac and Linux.

  • Haha 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...