Associative array or object to save temporary meta data?

1

I have a system that will do a parser of web pages, during the process the parser should store some data about the page like: page type (dynamic, static), size (in bytes) this data about the page should be saved in an associative array ex: $meta_dados[tipo] = 'dinamica'; or in an object? will not be stored in any location this information having thus only use during the parser

    
asked by anonymous 03.03.2015 / 13:24

1 answer

2

It goes from the taste of the customer, there is not a correct way in this aspect, the best way is to meet you. Just try to maintain consistency, if your application was implemented using Object Orientation, make a class to keep the metadata. If you are using the procedural form it does not make much sense to put a class to store the metadata but rather to use a variable directly as the array.

    
03.03.2015 / 15:10