r/PHPhelp • • Nov 28 '17

Can you learn PHP without PHP?

I've been asked to learn PHP. I work at a big bureaucratic org where I don't have the ability to install anything myself. I put in a request to have PHP, Apache, and MySQL installed, but it might take a while.

Is there a tutorial site that has a PHP simulator so I can study while I wait?

Is there something I can download and use to practice PHP without having admin or root privileges?

Thanks either way.

8 Upvotes

10 comments sorted by

5

u/am0x Nov 29 '17

Cloud9 or CodeAnywhere. Online IDE and environments. Assuming there is no block at work and you can pretty much do whatever you want on them.

You can even install frameworks, different servers, node, composer, etc.

4

u/colshrapnel Nov 29 '17

Is there something I can download and use to practice PHP without having admin or root privileges?

Yes, of course. If you care to look at the PHP download page you will notice that PHP is provided as a zip archive. Which you can download and unzip anywhere on your PC. There will be a php.exe file which you can use to practice php by either running it as a command line or by running a built-in web-server.

As of the database, use PDO with Sqlite, it will serve just perfectly to learn the basics.

3

u/qp13 Nov 28 '17

You could use something like this to see how the basics work.

A better option would be to get a LAMP droplet on Digital Ocean and have a play around.

I'm not sure how comfortable you are with development in general but you could use Git or FTP to get your files up there. You could even use Vim to directly edit your files on the server if you're familiar with it.

1

u/I_want_fun Nov 29 '17

Check out sites like codeacademy and codewars. Sites like this have their own online place to teach you plus they teach the basics of the language.

1

u/Mike312 Nov 28 '17

So, it's a little janky, but you could go to w3schools.com and find a page in their PHP section with an example with a "run example" button. It'll pop open a Try It window which will let you run short bits of code.

So you could potentially hijack that to learn some basic PHP while the higher-ups align ducks.

Nevermind. They took that ability away. Probably because it's a massive security hole.

1

u/brownbob06 Nov 28 '17

If possible, you could use Chrome remote desktop and set everything up on your home PC. I'm not sure if Chrome extensions are also blocked for you or not or how that would go over with work policy though, I would check with a supervisor first.

I would highly recommend a VM though instead of just having someone set everything up for you. It will be much quicker for them to download something like VirtualBox than setting up an entire environment for you.

1

u/biinjo Nov 29 '17

You can use the PHP Sandbox here:

http://sandbox.onlinephpfunctions.com/

That can be helpful to run and test some code.

1

u/supersonic_princess Nov 29 '17

You could use a cloud IDE like cloud9; that's how I do most of my non-production work. It lets you do everything in a browser.

1

u/davef139 Nov 29 '17

You could buy a cheapo hosting plan somewhere and use that to dev.

1

u/Asselberghs Nov 29 '17

Could you use this perhaps? a LAMP stack from Bitnami.
If I recall correctly it's free.
https://bitnami.com/stack/lamp
I haven't used this stack specifically, but I have tried some of their other stacks.
There is also a WAMP variant on bitnami.com.