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

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -