{"id":19935916,"url":"https://github.com/full-stack-web-developer-and-designer/php-function-check-capacity","last_synced_at":"2025-07-13T17:09:10.955Z","repository":{"id":204599982,"uuid":"594126612","full_name":"full-stack-web-developer-and-designer/PHP-function-check-capacity","owner":"full-stack-web-developer-and-designer","description":"A PHP custom function to check if the number of attendees for an event is below capacity for a specific venue.","archived":false,"fork":false,"pushed_at":"2023-01-28T13:47:04.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T12:19:32.655Z","etag":null,"topics":["mirnesglamocic","php","phpfunction"],"latest_commit_sha":null,"homepage":"https://replit.com/@MirnesGlamocic/PHP-function-event-capacity#index.php","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/full-stack-web-developer-and-designer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-01-27T16:59:14.000Z","updated_at":"2023-01-27T21:31:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c454f9b-d215-4cb9-aaa8-aacf4f1ff6c1","html_url":"https://github.com/full-stack-web-developer-and-designer/PHP-function-check-capacity","commit_stats":null,"previous_names":["full-stack-web-developer-and-designer/php-function-check-capacity"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/full-stack-web-developer-and-designer/PHP-function-check-capacity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/full-stack-web-developer-and-designer%2FPHP-function-check-capacity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/full-stack-web-developer-and-designer%2FPHP-function-check-capacity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/full-stack-web-developer-and-designer%2FPHP-function-check-capacity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/full-stack-web-developer-and-designer%2FPHP-function-check-capacity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/full-stack-web-developer-and-designer","download_url":"https://codeload.github.com/full-stack-web-developer-and-designer/PHP-function-check-capacity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/full-stack-web-developer-and-designer%2FPHP-function-check-capacity/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265175567,"owners_count":23722661,"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":["mirnesglamocic","php","phpfunction"],"created_at":"2024-11-12T23:22:36.529Z","updated_at":"2025-07-13T17:09:10.912Z","avatar_url":"https://github.com/full-stack-web-developer-and-designer.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP function check capacity\nThis repository contains a custom **PHP function** for compare two values and check if the number of attendees for an event is below capacity for a particular venue. So, is given a list of places, capacity and registered participants, and using the PHP function **check_capacity()** the capacity for participant registration is compared and returned one of the two messages. \n\nIf the number of attendees is bellow the venues capacity return _\"There are still tickets available!\"_ If the number of attendees is equal to or above the venues capacity return _\"This event is sold out!\"_.  Function **check_capacity()** accepts two arguments, the capacity and the number of attendees. \n\nThe input will be a two dimensional array where the key is a venue name and the value is a two element array of capacity and attendees. The default value for attendees in the check capacity function is zero. So, the function **check_capacity()** will print the name of the venue, then the message returned by the **check_capacity()** function.\n\n---\n\nTo check how it looks, click on the preview and then on the green run button.\n##\n[PREVIEW](https://replit.com/@MirnesGlamocic/PHP-function-check-capacity?v=1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffull-stack-web-developer-and-designer%2Fphp-function-check-capacity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffull-stack-web-developer-and-designer%2Fphp-function-check-capacity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffull-stack-web-developer-and-designer%2Fphp-function-check-capacity/lists"}