Giter Club home page Giter Club logo

php-snippets-for-vscode's Introduction

PHP snippets

Version Installs Ratings

Maintainability Test Coverage

This extension contains code snippets for [Vs Code][code] editor (supports PHP).

Installation

  1. Open the extensions sidebar on Visual Studio Code
  2. Search for php snippets
  3. Click Install
  4. 🌟🌟🌟🌟🌟 Rate five-stars 😃

The languages supported (file extensions)

  • PHP (.php)

Snippets

Snippets are optimized to be short and easy to remember.

Below is a list of all available snippets and the triggers of each one. The ⇥ means the TAB key.

Import and export

Trigger Content
eco⇥ echo ""; statement.
pri⇥ print($ex); statement.
dump⇥ var_dump($ex) statement
pre_dump⇥ echo '<pre>';\nvardump($ex); \necho '</pre>'; formated var_dump output
fore⇥ foreach(iterable_expr as $value) {...}
forek⇥ foreach(iterable_expr as $key => $value) {...
prif⇥ private function name() {}
prisf⇥ private static function name() {}
prof⇥ protected function name() {}
prosf⇥ protected static function name() {}
pubf⇥ public function name() {}
pubsf⇥ public static function name() {}
fn⇥ fn($x) => $x * 10 Arrow function
inc⇥ include $file include filename
inco⇥ include_one $file include_one filename
req⇥ require $file require filename
reqo⇥ require_once $file require_once filename
thr⇥ throw new $0 throw an exception
ns⇥ namespace App; namespace App is an example
mt⇥ match($ex) {...} match expression
G⇥ $_GET['var'] $_GET Superglobal
P⇥ $_POST['var'] $_POST Superglobal
SE⇥ $_SERVER['var'] $_SERVER Superglobal
SESS⇥ $_SESSION['var'] $_SESSION Superglobal
REQ⇥ $_REQUEST['var'] $_REQUEST Superglobal
FI⇥ $_FILE['var']['name'] $_FILE Superglobal

Issues & Suggestions

For any issues or suggestions, please use GitHub issues.


Happy coding _ PHP developer _


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.