in php,  initialise an array by $data = [] might not work, use the proper way $data = array();