Removal of old PHP class var use

Closes #6962

@claudiosmweb didn't touch anything under `node_modules` so you may want to look at that too (or I can do PR for that too, but it was ignored so I didn't try this time)