With PHP you get an output file, with JavaScript you do not so PHP is probably a better Choice, least these syntax checkers do not check the file, list of all CSS Color Names they are not web-safe.
This file didn't pass but you can click to view errors: Valid XHTML 1.0 Transitional Valid CSS!