Science, Tech, Math › Computer Science Using Notepad or TextEdit for PHP How to Create and Save PHP in Windows and macOS Share Flipboard Email Print A screenshot PHP code. Getty Images/Scott-Cartwright Computer Science PHP Programming Tutorials MySQL Commands Perl Python Java Programming Javascript Programming Delphi Programming C & C++ Programming Ruby Programming Visual Basic View More By Angela Bradley Angela Bradley Computer Science Expert B.A, History, Eastern Oregon University Angela Bradley is a web designer and programming expert with over 15 years of experience. An expert in iOS software design and development, she specializes in building technical hybrid platforms. Learn about our Editorial Process Updated on January 29, 2019 You don't need any fancy programs to work with the PHP programming language. PHP code is written in plain text. All Windows computers including those running Windows 10 come with a program called Notepad that creates and modifies plain-text documents. Saving PHP Documents In your text editor, just save the PHP source code with a PHP extension. Windows may or may not recognize PHP as a valid system file type, but it doesn't matter. You generally don't want Windows to attempt to execute a PHP script. You could, however, associate PHP as a file type that your favorite text editor manages, so double-clicking a PHP file will open it in that editor. Media Files Saved as PHP Some browser plugins that download media from web pages will incorrectly capture the media file's correct extension. The file will save with the correct name, but with a PHP extension. This glitch occurs only occasionally and stems from the media file sourcing from a PHP-enabled page. All you need to do is change the PHP extension to something like MP4. Video-playback programs like VLC accept the MP4 extension without complaining, even if the underlying video type is something else. Writing PHP Unlike some programming and scripting languages, PHP is not sensitive to indentations. Therefore, any indentations you make to your PHP code to aid your readibility are fine. Other Programs to Edit PHP Files Notepad is simple, but it's not the only choice. Mac users can use TextEdit. Hardcore programmers (usually, on Linux) rely on environments like Emacs or Vim. Better than using a text editor — which, by design, just edits text, without additional functionality — is to use a text editor optimized for coding. On the Windows platform, programs like Visual Studio Code, BB Edit, UltraEdit, and Notepad++ not only edit your text but can lint (analyze for errors) and format your code with special colors and related visual cues. Cite this Article Format mla apa chicago Your Citation Bradley, Angela. "Using Notepad or TextEdit for PHP." ThoughtCo, Aug. 27, 2020, thoughtco.com/using-notepad-for-php-2694154. Bradley, Angela. (2020, August 27). Using Notepad or TextEdit for PHP. Retrieved from https://www.thoughtco.com/using-notepad-for-php-2694154 Bradley, Angela. "Using Notepad or TextEdit for PHP." ThoughtCo. https://www.thoughtco.com/using-notepad-for-php-2694154 (accessed March 27, 2023). copy citation Featured Video