Environment Variables - Intro into modern PHP development

Published: 22 August 2024
on channel: Frank Prins
1,040
30

This is part 6 of a series introducing professional PHP development in 2024, where we'll use environment variables to connect to a database, and look into how to use Environment variables throughout our container.

00:00 Intro
00:28 Database in Docker Compose setup
02:03 Testing database connection
02:56 Extending docker image
04:02 getenv
05:03 .env file
06:54 Loading env files
07:30 strict env keys
08:32 The Environment class
09:24 Adding Environment to the container
10:15 parsing the .env file
11:49 using the Environment class
12:44 using the environment variables
13:35 Outro


On this page of the site you can watch the video online Environment Variables - Intro into modern PHP development with a duration of hours minute second in good quality, which was uploaded by the user Frank Prins 22 August 2024, share the link with friends and acquaintances, this video has already been watched 1,040 times on youtube and it was liked by 30 viewers. Enjoy your viewing!