Is It Possible to Declare Constant with Associative Array [duplicate]
This question already has answers here : PHP Constants Containing Arrays? (21 answers) Closed 2 years ago . I am trying to declare a constant for our office names of each country with associative array. My declaring code is as below: define( "OUR_OFFICE", [ "Japan" => "Tokyo Shibuya Office", "Taiwan" => "Taipei Shilin Office", "Korea" => "Seoul Yongsan Office", "Singapore" => "Singapore Novena Office", "Australia" => "Sydney Darlinghurst Office" ]); However, it just shows message: Warning: Constants may only evaluate to scalar values Is it possible to declare a constant with associative array?