[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


I starting with php

Posted on 2016-08-17
Medium Priority
Last Modified: 2016-11-27
Hi all,
im starting with php
how to run and compile, i be able to run  it microsoft visual studio?
or how is the best advice for star coding and publishing web pages  with php?
regards you experts
Question by:Ernesto
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +6
LVL 44

Assisted Solution

by:zephyr_hex (Megan)
zephyr_hex (Megan) earned 200 total points
ID: 41759875
Visual Studio doesn't support PHP.  You'll need a different editor.  There are a lot of good ones to choose from (just google it).  I personally use NetBeans.

PHP doesn't compile.  To run / publish it, you just put the PHP file on a server that has PHP installed.

I'm sure many experts will have different ideas on how to start.  My recommendation is that you learn HTML first, and learn the difference between server side and client side processing, as well as the fundamentals of what happens when a user navigates to a PHP file with their web browser (what happens on the server in order to allow the user to see the page?).

You should also understand the basics of web forms, and how to pass variables / data using forms ($_GET and $_POST).

Once you're able to create a basic web form, you'll probably want to delve into learning how to interact with a database from PHP.  MySQL is often used with PHP.

Oh, and I also recommend that you start reading PHP questions here at E-E and attempt to resolve other people's problems.  I've learned so much in working through various problems.
LVL 13

Assisted Solution

by:Abhijeet Rananaware
Abhijeet Rananaware earned 200 total points
ID: 41759891
For Windows install wamp or xamp server locally.

For wamp put your project code inside C:\wamp\www\PROJECT_NAME\filename.php

You can run it in browser using http://localhost/PROJECT_NAME/filename.php

For Xamp path will be different


LVL 30

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 200 total points
ID: 41759928
Visual Studio is the wrong vendor. There once were IronPython, IronRuby, and IronPHP involving the .NET Framework with these scripting languages, but I don't hear anything about these today.

You may also start more modern in the cloud age and use an online development environment like codeanywhere.

For starters, though, and to also learn a bit about all the tooling including web server, database server and IDE I'd recommend installing XAMPP. XAMPP not only lowers your work about the initial setup, it also includes an Add-On system from Bitnami to easily install Wordpress or other systems.

Once you're having that I'd rather start coding with a simple PHP capable editor like Notepad++. You should aim for PHPStorm as your IDE, but to make better use of the trial period you should learn some PHP first, also to see, whether it is for you at all.

Here's a very strong warning: While PHP is considered an easy beginner programming language, web development itself is involving many things and you may get overwhelmed by also having to learn HTML, CSS and Javascript, SQL and some knowledge in HTTP and web server configuration and other side knowledge to glue this together.

And that's also not the end, basic PHP knowledge will not bring jobs to you, you should also choose yet another thing. What framework in conjunction with PHP will you aim for? Today's two best candidates are Symfony and Laravel. And then it'll also help to know a CMS and Shop System, further things on your to-do list...

Bye, Olaf.
Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?


Author Comment

ID: 41759945
oh man, so encouraging messages!
LVL 111

Accepted Solution

Ray Paseur earned 1000 total points
ID: 41759954
There is a lot to learn.  Here's a good place to start, with links to best-of-breed learning resources.

Here are (some of) the things to avoid.

PHP depends on the client/server protocols.

The state-of-the-art PHP Editor / IDE is PhpStorm.
However, for just starting out with PHP, you're better off using a plain text editor and writing a few lines of code, just to see what the common errors and pitfalls are.  Then you will know how to spot them, and more importantly, how to avoid them.

You may already know this stuff from your work in other languages, but PHP has a reasonably good object model.

Patterns of test-driven development are popular among PHP professionals.

Some of the most common questions and misunderstandings arise about date/time processing.

Generally speaking, I would avoid Windows and jump right into Linux.  A week or two and you'll know most everything you need to know about the command line.  Without this knowledge, you find that a lot of good information is out of reach.  Personally I use Windows only as a text-editor platform.  I upload all my PHP scripts to a Linux server and run all my tests over the internet, getting the test environment to be a close match with the deployed environment.

Best of luck with your learning adventures!
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 200 total points
ID: 41760033
As you may figured out from the responses above, PHP is almost entirely different than coding with any of the languages supported by Visual Studio.  One of the most important things in my opinion is that PHP doesn't hide anything from you while language statements like 'runat server' in .NET languages are almost always hiding something from you that shows up differently in the browser.
LVL 12

Assisted Solution

jet-black earned 200 total points
ID: 41760152
I think you should start with a course like The Complete Web Developer Course - Build 14 Websites.
I think "learning by doing" approach is the best way to get experience on programming.

For the IDE choice, it is really hard to tell the best one. You'll need to try out several IDEs and choose your favorite one. I personally use NuSphere PhpED but there are other powerful IDEs like PhpStorm, Zend Studio, etc. (Here is the list of some of them)
If you want to use Visual Studio for PHP development, this is also possible: VS.Php, PHP Tools for Visual Studio
LVL 44

Expert Comment

by:zephyr_hex (Megan)
ID: 41796769
edo60 - did any of these responses answer your question?  If so, please close your question and mark the answer(s).

Author Closing Comment

ID: 41798604
thank you all

Expert Comment

ID: 41798643
I agree with Ray that Linux is the way to go about it. Install a linux operating system, then install Apache, MySQL, and PHP and you can start there.

The essential PHP and MySQL class on Lynda.com was the first class that really clicked for me. I've been working out of Larry Ullman's PHP and MySQL and that book has been helpful.

Other books I would recommend are Advanced PHP and Object Oriented Programming by Larry Ullman, PHP Objects Patterns and Classes, and Essential PHP Security. I would also highly recommend the book Modern PHP, I'm not there yet but I see the potential after skimming through it - PHP has evolved the past few years into a language that can support large scale enterprise applications and there are a lot of new features in it.

I realize this is a lot but once you get used to the idea that one book won't "teach" you PHP all the way through you kind of accept it and the more you do you have an idea of what you have to do - that's where I am now.

Good luck.

Expert Comment

ID: 41800082
Definitely get PHP Objects Patterns and Practice.

Once you complete Advanced PHP and Object Oriented Programming you will be able to work with frameworks, but Objects Patterns and Practice will allow you to evaluate frameworks and how well they are coded.

PHP and MySQL for Dynamic Websites is the place to start. If you have trouble with it start at PHP for the Web (same author) but that book is a little watered down so I would just start at PHP and MySQL for Dynamic Websites.

Expert Comment

ID: 41903601
Nowadays you can develop and debug PHP projects with Visual Studio using an extension called PHP Tools . There used to be another one called VS PHP but it seems its development is dead. There is a free version of PHP Tools that can work with Visual Studio Community Edition 2013, 2015 and 2017. There is a tutorial for PHP Tools extension here as well part 2 and part 3.

Anyway there are several other IDEs that work on Windows, just are not Visual Studio. Here is a comparison side by side of PHP IDEs actively being developed nowadays, some are commercial but others are free or have free versions.

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question