News for hackers. Stuff that matters.

Ask HN: What's your PHP development environment setup?

I got a Lenovo IdeaPad as a gift S340

I'm wondering if it's wroth installing Linux Ubuntu on on my Lenovo or just keeping my Windows 10 and learn PHP on windows?

What would you recommend? what are some of your setups so I can get some ideas.

It seems like is hard to install PHP Dev Env on Windows 10 it keeps asking to install redistributable.

I think MacBook was the best laptop I had because you can just install MAMP.

( 13 comments | 8 points | on HN )
Re:Ask HN: What's your PHP development environment setup? by bhdzllr on Tuesday June 16, 2020 @02:59AM (#23536610)
You can use docker, so the OS doesn't matter and you don't need to install a webserver, php, mysql and other things on your main system. Even if you use Ubuntu as your main system it's good idea to use docker for you local environment.

If you need a starting point I have a example on GitHub that may help you: https://github.com/bhdzllr/localhost/tree/master/docker-lemp

It's a LEMP stack. You need to change the volumes in the "docker-compose.yaml" to match to your system and adapt and copy the "nginx/default.conf" into the volume path of nginx. The "nginx/default.conf" has some examples which you may delete.

Re:Ask HN: What's your PHP development environment setup? by smt88 on Saturday June 13, 2020 @11:06PM (#23514773)
Don't use MAMP.

Use whatever OS you like in terms of UI. If you enjoy MacOS, use it.

Run PHP in a container that matches your servers and has declarative infrastructure (Docker Compose, Vagrant, Ansible, Pulumi, whatever). All have boilerplate PHP configs you can download.

Then use PhpStorm. VS Code is free but not even in the ballpark in terms of static analysis, refactoring, linting, and autocomplete.

Re:Ask HN: What's your PHP development environment setup? by vincent_s on Sunday June 14, 2020 @01:21AM (#23515320)
I use PHP-Storm + Vagrant on Windows 10. There are plenty of pre-packaged Vagrant Boxes for this use case like VCCW [1] or Homestead [2]. Setup only takes a few minutes and you can keep your Windows 10 while using Ubuntu to run your PHP code.

[1] http://vccw.cc/ [2] https://laravel.com/docs/7.x/homestead

Re:Ask HN: What's your PHP development environment setup? by throwaway888abc on Saturday June 13, 2020 @09:15PM (#23514312)
Linux + VS Code + Docker Compose + PHP in container + source mounted

OS: Pop_OS, Regolith, Manjaro, Ubuntu

Invest time in learning Linux basis, you will be positively surprised.

Re:Ask HN: What's your PHP development environment setup? by Raed667 on Sunday June 14, 2020 @02:38AM (#23515591)
XAMPP [1] provides a fairly complete dev environment with a basic web sever and DB. Do this if you find using Docker an overkill for your project.

Bonus point, they have good integrations with AWS and GCP.

[1] https://www.apachefriends.org/fr/index.html

Re:Ask HN: What's your PHP development environment setup? by mekster on Monday June 15, 2020 @08:48AM (#23526716)
Don't do weird setup on Windows or Mac locally.

Just get a native Linux through virtualization like VirtualBox or VMware or WSL (maybe wait for WSL2) and run Ubuntu in it. You'll find it makes sense when you want to deploy stuff on the cloud on Ubuntu with mostly identical environment.

Re:Ask HN: What's your PHP development environment setup? by juangacovas on Saturday June 13, 2020 @10:34PM (#23514649)
If you're having a hard time with Visual C++ Redist. packages on Windows for WAMP, just try the packages on page bottom here: http://wampserver.aviatechno.net/?lang=en
Re:Ask HN: What's your PHP development environment setup? by leeshire on Sunday June 14, 2020 @03:50AM (#23515855)
That solved a lot of headache geee thanks.
Re:Ask HN: What's your PHP development environment setup? by juangacovas on Sunday June 14, 2020 @05:33AM (#23516284)
Welcome
Re:Ask HN: What's your PHP development environment setup? by LarryMade2 on Sunday June 14, 2020 @03:36PM (#23520636)
Linux Mint - was using Ubuntu but it isn't always up to date on PHP/MySQL versions.

IDE - Eclipse/PHP

Never been a fan of Windows' inconveniences, and Apple is notoriously fickle on Unix support, timeliness, versions, and patches.

Re:Ask HN: What's your PHP development environment setup? by rocketpastsix on Sunday June 14, 2020 @10:43AM (#23517986)
Im on MacOS

I use PHPStorm for my IDE, but sometimes I try VS Code before I give up and remember why I dont use it.

I use the Homestead Vagrant box from Laravel since my dev work is Laravel.

Re:Ask HN: What's your PHP development environment setup? by silb on Monday June 15, 2020 @11:19AM (#23528189)
Debian stable, Eclipse PDT, PHP 7.4 and Xdebug compiled from source.
Re:Ask HN: What's your PHP development environment setup? by cordaciu on Monday June 15, 2020 @12:23PM (#23529111)
iMac

All environment are setup using docker compose

PhpStorm & macVi

Search Results

Web result with site links

Sequel Pro for mysql management