- get_defined_constants: documentation ( source)
- array_keys: documentation ( source)
- usort: documentation ( source)
<?php
$consts = get_defined_constants();
$consts = array_keys($consts);
usort($consts,function($a,$b){return (int)(strlen($a)<strlen($b));});
foreach($consts as $const){
echo strlen($const).": ".$const."\n";
}
This script was stopped while abusing our resources