Sos Tariffe interview question

Basic php code. Data structures and algorithms applied.