Welcome Guest, Not a member yet? Register   Sign In
Undefined constant CodeIgniter\Router\Router::HTTP_METHODS
#2

According to the PHP Manual:

class constant are by default public in nature but they cannot be assigned visibility factor and in turn gives syntax error.


PHP Code:
<?php

class constants {

    const MAX_VALUE 10;
        public const MIN_VALUE =1;

}

// This will work
echo constants::MAX_VALUE;

// This will return syntax error 
echo constants::MIN_VALUE
?>
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Undefined constant CodeIgniter\Router\Router::HTTP_METHODS - by InsiteFX - 06-25-2024, 03:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB