- strtoupper: documentation ( source)
- setlocale: documentation ( source)
- constant: documentation ( source)
<?php
class test {
const PRODUCTION = 20;
public static $environment = 10;
}
setlocale(LC_ALL, 'tr_TR.UTF-8');
test::$environment = constant('test::'.strtoupper('production'));
echo (test::$environment);