如何在xampp安装时在visual studio代码中运行php?

when PHP file will created in visual studio code
error message will be generated
i install all PHP related extension in vs code

error message screenshot in vs code error message screenshot in vs code

This error message has nothing to do with running PHP code. According to the dialogue you've installed the phpcs extension (emphasis mine):

This linter plugin for Visual Studio Code provides an interface to phpcs. It will be used with files that have the “PHP” language mode.

… but didn't complete the installation instructions:

Before using this plugin, you must ensure that phpcs is installed on your system. The preferred method is using composer for both system-wide and project-wide installations.

The tool name is actually PHP_CodeSniffer (phpcs is the name of one of the commands it provides) and you can find more comprehensive instructions in its Github project.

In any case you would still not done yet since you still need to configure the rules you want PHP_CodeSniffer to enforce. E.g., to enforce PSR-2 you can create a file called phpcs.xml in your project root:

<?xml version="1.0"?>
<ruleset name="My project coding style">
    <rule ref="PSR2"/>
    <file>.</file>
</ruleset>