{"id":20269627,"url":"https://github.com/yeungon/zce","last_synced_at":"2025-04-11T04:02:43.719Z","repository":{"id":80696297,"uuid":"131409813","full_name":"yeungon/ZCE","owner":"yeungon","description":"Advanced PHP exercise, Zend Certified Engineer material: ~ 137 questions","archived":false,"fork":false,"pushed_at":"2019-09-10T12:39:14.000Z","size":151,"stargazers_count":41,"open_issues_count":1,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-11T04:02:36.804Z","etag":null,"topics":["php","zce"],"latest_commit_sha":null,"homepage":"","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/yeungon.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-28T12:59:49.000Z","updated_at":"2024-11-03T03:17:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"92a1e76c-5ede-4c4a-8ada-ad191181f6df","html_url":"https://github.com/yeungon/ZCE","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeungon%2FZCE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeungon%2FZCE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeungon%2FZCE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeungon%2FZCE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeungon","download_url":"https://codeload.github.com/yeungon/ZCE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339285,"owners_count":21087215,"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":["php","zce"],"created_at":"2024-11-14T12:26:09.777Z","updated_at":"2025-04-11T04:02:43.712Z","avatar_url":"https://github.com/yeungon.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nZCE standing for Zend Certificate Engineer is a enterprise standard test that evaluates the competence about PHP in a wide range of aspects of the language. There are 11 groups of knowledge that are challenged when taking the test. The material listed in this repository is compiled for that purpose. \n\n# Practise makes perfect\n\nA number of code snippets, most of them are relatively short, can be found in the folder named \"practise\". You can fork them if you want to have a look via localhost. You can even find the anwser for each question within the file listed. Normally in each file, there is an echo or print line which output something either string or integer. You have to calculate when looking the code snippet to find the output by yourself if you want to do some practice. \n\n# Copyright\n\nThe content in this repository is under CC BY-NC-ND \n\n# Update September 2019\n\nWe are going to update the question here instead of the \"practise\" folder. Currently, we have 137 questions awaiting for you.\n\n---\n\n###### 1. What's the output?\n```php\n\n$a = 'a'; $b = 'b';\n\necho isset($c) ? $a.$b.$c : ($c = 'c').'d';\n```\n- A:  abc\n- B:  ab\n- C:  cd\n- D:  ac\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eAnswer\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n#### Answer: C\n\nAs `$c` is not declared then we get `else`, meaning `echo ($c = 'c').'d';`, which returns \"cd\". This is the first question, so hello world :-)\n\u003c/p\u003e\n\u003c/details\u003e\n\n---\n\n###### 2. What's the output?\n```php\n\nclass ZCE {\n\tpublic $me = 1;\n\tpublic function __construct($me) { \n\t\t$this-\u003eme = $me; \n\t}\n\tpublic function getProp() {\n\t\treturn function($he) {\n\t\t\treturn $this-\u003eme*$he;\n\t\t};\n\t}\n}\n\n$a = new ZCE(2);\n\n$a-\u003egetProp = function($x) {\n\treturn $x*$x;\n};\n\n$m = $a-\u003egetProp();\n\necho $m(3);\n\n```\n- A:  5\n- B:  6\n- C:  7\n- D:  8\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eAnswer\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n#### Answer: B\n\nWe have two functions named getProp(), one declared inside the class and another one declared with the object `$a` and that override the previous one. Yet, when we call `$m = $a-\u003egetProp();`, we still access to the method declared inside the ZCE class.\n\nCheck the result at https://3v4l.org/eAOR4\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeungon%2Fzce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeungon%2Fzce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeungon%2Fzce/lists"}