php 5.3 - php get the value of a constant -



php 5.3 - php get the value of a constant -

i want value of constant "test" using "test1".

i have tried getting "test1" value not "test" value.

<?php class test { const test='fast'; const test1=test; function testing() { echo test::test1; } } <?php include_once('class.test.php'); $d=new test; echo $d->testing(); ?>

any suggestions?

use const test1 = self::test; define constant.

php php-5.3 class-constants

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

ubuntu - Bash Script to Check That Files Are Being Created -

Php operator `break` doesn't stop while -