It's OK in case they are set like
define('PASSWORD', 'secretWord123');
$another_password = 'SomeThingOneShouldKnow4ever';
But then if they are just
123rwfwtery
sqwjgy4358dfjk
FhGFkGH
then they will be printed. It all depends on wanted format for these data.
And I'm not very experienced with access privileges and stuff, but if I chmod the file to smth restrictive, isn't there a chance the script won't be able to access it? Script usually runs with webserver privileges, doesn't it?