TirotirPHP is a Visual Studio Code extension designed to provide quick access to essential PHP examples. This extension offers a variety of snippets ranging from basic PHP concepts to more advanced functionality, such as file handling, form submission, cookies, sessions, and database operations.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
TirotirPHP is a Visual Studio Code extension designed to provide quick access to essential PHP examples. This extension offers a variety of snippets ranging from basic PHP concepts to more advanced functionality, such as file handling, form submission, cookies, sessions, and database operations.
Usage
PHP Examples
The extension provides a list of commands to insert pre-defined PHP examples directly into your workspace (in a .php file). Here is a breakdown of the available commands:
<?phpw: A Super-Simple PHP Introduction. What is PHP?
<?php01: PHP EXAMPLE 1. Hello World!
<?php02: PHP EXAMPLE 2. Variables and Data Types.
<?php03: PHP EXAMPLE 3. Arithmetic Operations.
<?php04: PHP EXAMPLE 4. If-Else Statement.
<?php05: PHP EXAMPLE 5. Switch Case 1.
<?php06: PHP EXAMPLE 6. Switch Case 2.
<?php07: PHP EXAMPLE 7. Hello, [name]!
<?php08: PHP EXAMPLE 8. For Loop 1.
<?php09: PHP EXAMPLE 9. For Loop 2.
<?php10: PHP EXAMPLE 10. While Loop 1.
<?php11: PHP EXAMPLE 11. While Loop 2.
<?php12: PHP EXAMPLE 12. Function 1.
<?php13: PHP EXAMPLE 13. Function 2.
<?php14: PHP EXAMPLE 14. Function 3.
<?php15: PHP EXAMPLE 15. Arrays.
<?php16: PHP EXAMPLE 16. Associative Arrays.
<?php17: PHP EXAMPLE 17. Array Looping.
<?php18: PHP EXAMPLE 18. String Functions.
<?php19: PHP EXAMPLE 19. Include Files.
<?php20: PHP EXAMPLE 20. form.php (related to Example 21).
<?php21: PHP EXAMPLE 21. submit.php (related to Example 20).
<?php22: PHP EXAMPLE 22. form2.php (the form that sends data using the GET method). Related to example23.
<?php23: PHP EXAMPLE 23. submit2.php (the script that processes the GET request)Related to example22.
<?php24: PHP EXAMPLE 24. FileUploadForm.php (Related to example 25.
<?php25: PHP EXAMPLE 25. FileUploadHandling.php (Related to example 24).
<?php26: PHP EXAMPLE 26. Cookie Setting.
<?php27: PHP EXAMPLE 27. Session Start.
<?php28: PHP EXAMPLE 28. Session Access.
<?php29: PHP EXAMPLE 29. Redirect to Another Page.
<?php30: PHP EXAMPLE 30. PHP Code to Create a Database and Table (when XAMPP/... is running).
<?php31: PHP EXAMPLE 31. form3.php. HTML form to input data into the phonebook table. Related to example 32.
<?php32: PHP EXAMPLE 32. submit3.php. (the PHP script to handle form submission). Related to example 31.
<?php33: PHP EXAMPLE 33. query.php (the PHP script to fetch and display data).
<?php34: PHP EXAMPLE 34. Some PHP Built-in Functions.
Features
Pre-built PHP code snippets: Easily insert common PHP examples into your workspace with just a few keystrokes.
Support for basic to advanced PHP topics: From variables and loops to file handling and database operations.
Streamline your PHP development: Speed up your coding process by using ready-made examples for common tasks.
Installation
Download and install the extension from the Visual Studio Code marketplace.
Use the Command Palette (Ctrl + Shift + P) to access TirotirPHP commands.
Type the command corresponding to the PHP example you need, such as <?php01 for the Hello World example.