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

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -