this may look duplicate for previous anonymous post but that code snippet only return 1 for constants value1-->first called the get_defined_constants by passing argument true to categorize the data2-->then using foreach iterate over index of the array3-->here printf is used to print title of the category4-->then it move on to interrior array and display the list of contants available in each category along with its value