il problema sono i nomi delle variabili che vuoi usare
Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore , followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
al posto di $1 metti $_1 o $a1, stessa cosa per le altre 5