Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>PHP Dynamic SnippetsNew to Visual Studio Code? Get it now.
PHP Dynamic Snippets

PHP Dynamic Snippets

M-Zoldak

|
33 installs
| (0) | Free
Dynamically filled PHP snippets according to PSR-4 format
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PHP Dynamic Snippets

Not gonna lie, most code was written by Chat-GPT. :)

Features

For now, extension brings 3 snippets with it:\

php - boilerplate for php file with fulfilled namespace and class name

<?php

namespace __automatically__filled__psr_4__namespace__;

class __class_from_filename__{

}


namespace - outputs automatically filled namespace according to path and psr-4 definition

namespace __automatically__filled__psr_4__namespace__;


class - outputs class with current filename

class __class_from_filename__{}

Requirements

  • composer.json must exist in folder structure above file from where the class is being created/edited
  • psr-4 paths defined inside composer.json
// composer.json
{
  "psr-4": {
    "Tests\\": "tests/",
    "App\\": "src/"
  }
}

Extension Settings

Currently no settings available

Release Notes

1.0.0

Initial release.

  • Snippets php, namespace, class
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft