Advertisement
jargon

DESIGNATIONS

Oct 9th, 2021
1,316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  1. const DESIGNATIONS = ['array' => 'red', 'string' => 'orange', 'integer' => 'orange', 'float' => 'orange', 'bool' => 'orange', 'object' => 'brown', 'null' => 'yellow', 'unknown' => 'purple'];
  2.  
  3. function trk_styles(string $designation):string {
  4.     return DESIGNATIONS[$designation] ?? '';
  5. }
  6.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement