3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php    class Test{        const ONE = "Number one";        const TWO = "Number two";    } $obj = new ReflectionClass( "Test" );    echo $obj->getconstant( "ONE" )."\n";    echo $obj->getconstant( "TWO" )."\n";    ?>
based on RVQRt
Output for 5.4.0 - 5.4.32
<?php    class Test{        const ONE = "Number one";        const TWO = "Number two";    } $obj = new ReflectionClass( "Test" );    echo $obj->getconstant( "ONE" )."\n";    echo $obj->getconstant( "TWO" )."\n";    ?>