{"id":17829656,"url":"https://github.com/guidefari/phpcrashcourse","last_synced_at":"2025-04-02T11:42:57.427Z","repository":{"id":124502344,"uuid":"503384951","full_name":"guidefari/phpcrashcourse","owner":"guidefari","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-14T14:05:45.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T02:44:28.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guidefari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-06-14T14:03:41.000Z","updated_at":"2022-06-14T14:03:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2d57e3b-dd7c-40f2-95d7-446e4fab1f84","html_url":"https://github.com/guidefari/phpcrashcourse","commit_stats":null,"previous_names":["guidefari/phpcrashcourse"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidefari%2Fphpcrashcourse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidefari%2Fphpcrashcourse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidefari%2Fphpcrashcourse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidefari%2Fphpcrashcourse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guidefari","download_url":"https://codeload.github.com/guidefari/phpcrashcourse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246811235,"owners_count":20837745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T19:16:54.737Z","updated_at":"2025-04-02T11:42:56.264Z","avatar_url":"https://github.com/guidefari.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notes\n- following along [Traversy media crash course](https://youtu.be/BUCiSSyIGGU)\n- Using docker compose, instead of xampp\n  - [here's an article I used](https://dev.to/truthseekers/setup-a-basic-local-php-development-environment-in-docker-kod) to help me get started with that\n- [PHP buys lambos](https://twitter.com/taylorotwell/status/1534178479201259520)\n\n# 01_output\n- closing tags are optional, unless you have something underneath them.\nthis is valid\n```php\n\u003c?php\n  echo \"Wagwan big man\";\n```\n- you need to have semi colons \n- `print_r([1,2,3])` gives a nicely formatted output - seems cool to use `print_r()` with arrays\n\n# 02_variables\n- Variables must be prefixed with $\n- Variables must start with a letter or the underscore character\n- variables can't start with a number\n- Variables can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )\n- Variables are case-sensitive ($name and $NAME are two different variables)\n\n- concatenation is with a dot and not a plus\n\n```php\necho $name . ' is '. $age . ' years old.';\n```\n\n- double quote makes it much better actually\n\n```php\necho \"$name is $age years old\";\n\n// you can also write it similar to how you would in JS\necho \"${name} is ${age} years old\";\n```\n\n- to create a constant, you use the `define` function\n```php\ndefine('HOST', 'localhost');\ndefine('DB_NAME', 'dev_db');\n\nvar_dump(HOST);\nvar_dump(DB_NAME);\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidefari%2Fphpcrashcourse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguidefari%2Fphpcrashcourse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidefari%2Fphpcrashcourse/lists"}