Skip to content

Kamilowskiy/phpSnippets

Repository files navigation

PHP Snippets for VS Code

PHP Snippets is a lightweight yet powerful extension that provides a collection of commonly used PHP code snippets, designed to speed up your workflow and boost your coding efficiency in Visual Studio Code.


✨ Features

  • ⌨️ Insert PHP structures like functions, loops, conditionals, and classes instantly.
  • 🔁 Ready-to-use code blocks: foreach, if, try/catch, PDO, etc.
  • 🧩 Handy snippets for echo, json, session_start, and more.
  • 🛠 Clean, readable, and customizable snippet definitions.

🚀 Snippet List

Prefix Description
echo Simple echo statement
phpfn Function template
if If condition
foreach Foreach loop
pdoselect PDO SELECT query
include Include a PHP file
require Require a file once
class PHP class with constructor & method
try Try-catch block
jsonres JSON API response
redirect Redirect using header
now DateTime with formatted output
session Start a session
ternary Ternary operator
for For loop
define Define a constant

⚙️ Requirements

This extension has no dependencies. Just install it and start using in .php files.


🔧 Extension Settings

This extension currently does not add any settings.


🐞 Known Issues

No known issues.

Please report bugs or ideas for improvements via GitHub Issues.


📦 Release Notes

1.0.2

  • ✅ Added over 15 ready-to-use PHP snippets.

💡 Contributing

Want to improve this extension or add your own snippets?

  1. Fork the repo
  2. Add or update snippets
  3. Create a pull request 🚀

📚 Resources


Enjoy faster and smarter PHP coding with PHP Snippets for VS Code.
Happy coding! 🐘💻

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published