[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"me":3,"catalog:en:backend\u002Fphp-exceptions":4,"config":252},null,{"field_key":5,"field_name":6,"seniority":7,"topic_key":8,"topic_name":9,"spec_key":7,"spec_name":7,"locale":10,"cell_total":11,"field_total":12,"seniorities":13,"topics":17,"specs":148,"samples":168},"backend","Backend","","php-exceptions","Php Exceptions","en",75,3300,[14,15,16],"junior","mid","senior",[18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99,102,105,108,111,112,115,118,121,124,127,130,133,136,139,142,145],{"key":19,"name":20,"count":11},"api-design","API Design",{"key":22,"name":23,"count":11},"caching","Caching",{"key":25,"name":26,"count":11},"concurrency","Concurrency",{"key":28,"name":29,"count":11},"csharp-concurrency-async","Csharp Concurrency Async",{"key":31,"name":32,"count":11},"csharp-exceptions","Csharp Exceptions",{"key":34,"name":35,"count":11},"csharp-generics-interfaces","Csharp Generics Interfaces",{"key":37,"name":38,"count":11},"csharp-memory-performance","Csharp Memory Performance",{"key":40,"name":41,"count":11},"csharp-stdlib-http","Csharp Stdlib Http",{"key":43,"name":44,"count":11},"csharp-testing-tooling","Csharp Testing Tooling",{"key":46,"name":47,"count":11},"databases-sql","Databases \u002F SQL",{"key":49,"name":50,"count":11},"go-concurrency","Go Concurrency",{"key":52,"name":53,"count":11},"go-errors","Go Errors",{"key":55,"name":56,"count":11},"go-interfaces-generics","Go Interfaces Generics",{"key":58,"name":59,"count":11},"go-memory-performance","Go Memory Performance",{"key":61,"name":62,"count":11},"go-stdlib-http","Go Stdlib Http",{"key":64,"name":65,"count":11},"go-testing-tooling","Go Testing Tooling",{"key":67,"name":68,"count":11},"java-concurrency","Java Concurrency",{"key":70,"name":71,"count":11},"java-exceptions","Java Exceptions",{"key":73,"name":74,"count":11},"java-generics-interfaces","Java Generics Interfaces",{"key":76,"name":77,"count":11},"java-memory-jvm","Java Memory Jvm",{"key":79,"name":80,"count":11},"java-stdlib-http","Java Stdlib Http",{"key":82,"name":83,"count":11},"java-testing-tooling","Java Testing Tooling",{"key":85,"name":86,"count":11},"messaging-queues","Messaging \u002F Queues",{"key":88,"name":89,"count":11},"networking-http","Networking \u002F HTTP",{"key":91,"name":92,"count":11},"nodejs-error-handling","Nodejs Error Handling",{"key":94,"name":95,"count":11},"nodejs-event-loop-async","Nodejs Event Loop Async",{"key":97,"name":98,"count":11},"nodejs-memory-performance","Nodejs Memory Performance",{"key":100,"name":101,"count":11},"nodejs-modules-streams","Nodejs Modules Streams",{"key":103,"name":104,"count":11},"nodejs-stdlib-http","Nodejs Stdlib Http",{"key":106,"name":107,"count":11},"nodejs-testing-tooling","Nodejs Testing Tooling",{"key":109,"name":110,"count":11},"php-concurrency-async","Php Concurrency Async",{"key":8,"name":9,"count":11},{"key":113,"name":114,"count":11},"php-generics-interfaces","Php Generics Interfaces",{"key":116,"name":117,"count":11},"php-memory-performance","Php Memory Performance",{"key":119,"name":120,"count":11},"php-stdlib-http","Php Stdlib Http",{"key":122,"name":123,"count":11},"php-testing-tooling","Php Testing Tooling",{"key":125,"name":126,"count":11},"python-concurrency-async","Python Concurrency Async",{"key":128,"name":129,"count":11},"python-errors-context","Python Errors Context",{"key":131,"name":132,"count":11},"python-memory-performance","Python Memory Performance",{"key":134,"name":135,"count":11},"python-stdlib-http","Python Stdlib Http",{"key":137,"name":138,"count":11},"python-testing-tooling","Python Testing Tooling",{"key":140,"name":141,"count":11},"python-typing-oop","Python Typing Oop",{"key":143,"name":144,"count":11},"security","Security",{"key":146,"name":147,"count":11},"testing","Testing",[149,153,156,159,162,165],{"key":150,"name":151,"count":152},"csharp","C#\u002F.NET",450,{"key":154,"name":155,"count":152},"go","Go",{"key":157,"name":158,"count":152},"java","Java",{"key":160,"name":161,"count":152},"nodejs","Node.js",{"key":163,"name":164,"count":152},"php","PHP",{"key":166,"name":167,"count":152},"python","Python",[169,187,200,214,227,240],{"id":170,"topic":9,"difficulty":171,"body":172,"options":173,"correct_key":175,"explanation":186},"019f7281-520f-742a-8d70-5e6de203203b",1,"```php\ntry {\n    throw new Exception(\"boom\");\n} catch (Exception $e) {\n    echo \"caught: \" . $e->getMessage();\n}\n```\nWhat is printed?",[174,177,180,183],{"key":175,"text":176},"a","caught: boom",{"key":178,"text":179},"b","boom",{"key":181,"text":182},"c","Fatal error: uncaught exception",{"key":184,"text":185},"d","Nothing is printed","The thrown Exception has message \"boom\". The catch block matches Exception and echoes the literal prefix plus getMessage(), producing \"caught: boom\".",{"id":188,"topic":9,"difficulty":171,"body":189,"options":190,"correct_key":181,"explanation":199},"019f7281-5211-77ca-905a-e11b2cd7c65c","```php\nfunction run() {\n    try {\n        echo \"A\";\n    } finally {\n        echo \"B\";\n    }\n}\nrun();\n```\nWhat is printed?",[191,193,195,197],{"key":175,"text":192},"A",{"key":178,"text":194},"B",{"key":181,"text":196},"AB",{"key":184,"text":198},"BA","No exception is thrown, so the try block runs normally and prints \"A\". The finally block always executes afterward, printing \"B\". Output is \"AB\".",{"id":201,"topic":9,"difficulty":202,"body":203,"options":204,"correct_key":178,"explanation":213},"019f7281-5217-7e76-af28-a26d88f7a979",2,"In PHP 8, calling a function declared with `strict_types=1` using an argument of the wrong type throws a `TypeError`. Does `catch (Exception $e)` catch a `TypeError`?",[205,207,209,211],{"key":175,"text":206},"Yes, because catch (Exception $e) is defined to match every internal throwable class PHP ships with",{"key":178,"text":208},"No — TypeError extends Error, not Exception, so a catch (Exception $e) block will not catch it",{"key":181,"text":210},"Only in PHP versions before 8.0, since the Error\u002FException split did not exist yet back then",{"key":184,"text":212},"Only if strict_types is disabled somewhere earlier in the same request","Error and Exception are separate class hierarchies that both implement Throwable, but neither extends the other. TypeError extends Error, so it will not be caught by catch (Exception $e); you would need catch (Error $e) or catch (Throwable $e).",{"id":215,"topic":9,"difficulty":202,"body":216,"options":217,"correct_key":184,"explanation":226},"019f7281-5218-79c2-ab54-bd38fc532040","```php\nfunction parse(int $mode) {\n    try {\n        if ($mode === 1) throw new InvalidArgumentException(\"bad arg\");\n        if ($mode === 2) throw new RuntimeException(\"bad state\");\n        return \"ok\";\n    } catch (InvalidArgumentException|RuntimeException $e) {\n        return \"handled: \" . $e->getMessage();\n    }\n}\necho parse(2);\n```\nWhat is printed?",[218,220,222,224],{"key":175,"text":219},"ok",{"key":178,"text":221},"handled: bad arg",{"key":181,"text":223},"Fatal error: invalid multi-catch syntax",{"key":184,"text":225},"handled: bad state","`catch (InvalidArgumentException|RuntimeException $e)` is valid multi-catch syntax (available since PHP 7.1) matching either type. With $mode = 2, a RuntimeException(\"bad state\") is thrown and caught, producing \"handled: bad state\".",{"id":228,"topic":9,"difficulty":171,"body":229,"options":230,"correct_key":175,"explanation":239},"019f7281-521c-7022-a6da-b8c0eb4cf16c","```php\nclass NotFoundException extends Exception {}\n\ntry {\n    throw new NotFoundException(\"user missing\");\n} catch (Exception $e) {\n    echo get_class($e) . \": \" . $e->getMessage();\n}\n```\nWhat is printed?",[231,233,235,237],{"key":175,"text":232},"NotFoundException: user missing",{"key":178,"text":234},"Exception: user missing",{"key":181,"text":236},"NotFoundException: missing",{"key":184,"text":238},"Nothing is printed, because get_class() cannot be called on a caught exception object","`class NotFoundException extends Exception {}` is already a fully valid custom exception with no extra code needed. `catch (Exception $e)` matches it because NotFoundException is-a Exception. get_class($e) returns the object's actual runtime class — NotFoundException — not the type used in the catch clause, so the output is \"NotFoundException: user missing\".",{"id":241,"topic":9,"difficulty":202,"body":242,"options":243,"correct_key":184,"explanation":251},"019f7281-521d-742d-a0db-e9b217b651d7","A team wants callers to be able to catch a \"user not found\" failure specifically, separately from other generic errors.\n```php\nclass UserNotFoundException extends Exception {}\n\nfunction findUser(int $id): array {\n    if ($id === 0) {\n        throw new UserNotFoundException(\"user $id not found\");\n    }\n    return [\"id\" => $id];\n}\n\ntry {\n    findUser(0);\n} catch (UserNotFoundException $e) {\n    echo \"specific: \" . $e->getMessage();\n} catch (Exception $e) {\n    echo \"generic: \" . $e->getMessage();\n}\n```\nWhat is printed?",[244,246,248,249],{"key":175,"text":245},"generic: user 0 not found",{"key":178,"text":247},"Fatal error: catch order is invalid here",{"key":181,"text":185},{"key":184,"text":250},"specific: user 0 not found","UserNotFoundException extends Exception, so a plain `class Name extends Exception {}` is a valid custom exception. Since the specific catch is listed first and matches, it runs before the generic one is ever considered.",{"fields":253,"seniorities":423,"interview_shapes":424,"locales":429,"oauth":431,"question_count":434,"coach_enabled":435,"jd_match_enabled":435},[254,265,285,302,326,339,358,377,397,404,410,417],{"key":5,"name_tr":6,"name_en":6,"sort":171,"specializations":255},[256,259,260,261,262,263,264],{"key":257,"name":258,"field":5},"general","Genel",{"key":154,"name":155,"field":5},{"key":166,"name":167,"field":5},{"key":157,"name":158,"field":5},{"key":150,"name":151,"field":5},{"key":160,"name":161,"field":5},{"key":163,"name":164,"field":5},{"key":266,"name_tr":267,"name_en":267,"sort":202,"specializations":268},"frontend","Frontend",[269,270,273,276,279,282],{"key":257,"name":258,"field":266},{"key":271,"name":272,"field":266},"javascript","JavaScript",{"key":274,"name":275,"field":266},"typescript","TypeScript",{"key":277,"name":278,"field":266},"react","React",{"key":280,"name":281,"field":266},"vue","Vue",{"key":283,"name":284,"field":266},"angular","Angular",{"key":286,"name_tr":287,"name_en":287,"sort":288,"specializations":289},"fullstack","Fullstack",3,[290,291,292,293,294,295,296,297,298,299,300,301],{"key":257,"name":258,"field":286},{"key":154,"name":155,"field":5},{"key":166,"name":167,"field":5},{"key":157,"name":158,"field":5},{"key":150,"name":151,"field":5},{"key":160,"name":161,"field":5},{"key":163,"name":164,"field":5},{"key":271,"name":272,"field":266},{"key":274,"name":275,"field":266},{"key":277,"name":278,"field":266},{"key":280,"name":281,"field":266},{"key":283,"name":284,"field":266},{"key":303,"name_tr":304,"name_en":304,"sort":305,"specializations":306},"devops-cloud","DevOps \u002F Cloud",4,[307,308,311,314,317,320,323],{"key":257,"name":258,"field":303},{"key":309,"name":310,"field":303},"aws","AWS",{"key":312,"name":313,"field":303},"gcp","GCP",{"key":315,"name":316,"field":303},"azure","Azure",{"key":318,"name":319,"field":303},"kubernetes","Kubernetes",{"key":321,"name":322,"field":303},"terraform","Terraform",{"key":324,"name":325,"field":303},"linux","Linux",{"key":327,"name_tr":328,"name_en":328,"sort":329,"specializations":330},"ai-engineer","AI Engineer",5,[331,332,333,336],{"key":257,"name":258,"field":327},{"key":166,"name":167,"field":327},{"key":334,"name":335,"field":327},"llm-rag","LLM\u002FRAG",{"key":337,"name":338,"field":327},"mlops","MLOps",{"key":340,"name_tr":341,"name_en":342,"sort":343,"specializations":344},"database","Veritabanı","Database",6,[345,346,349,352,355],{"key":257,"name":258,"field":340},{"key":347,"name":348,"field":340},"postgresql","PostgreSQL",{"key":350,"name":351,"field":340},"mysql","MySQL",{"key":353,"name":354,"field":340},"mongodb","MongoDB",{"key":356,"name":357,"field":340},"redis","Redis",{"key":359,"name_tr":360,"name_en":361,"sort":362,"specializations":363},"mobile","Mobil","Mobile",7,[364,365,368,371,374],{"key":257,"name":258,"field":359},{"key":366,"name":367,"field":359},"ios-swift","iOS (Swift)",{"key":369,"name":370,"field":359},"android-kotlin","Android (Kotlin)",{"key":372,"name":373,"field":359},"flutter","Flutter",{"key":375,"name":376,"field":359},"react-native","React Native",{"key":143,"name_tr":378,"name_en":144,"sort":379,"specializations":380},"Güvenlik",8,[381,382,385,388,391,394],{"key":257,"name":258,"field":143},{"key":383,"name":384,"field":143},"appsec","AppSec",{"key":386,"name":387,"field":143},"offensive-pentest","Offensive \u002F Pentest",{"key":389,"name":390,"field":143},"cloud-security","Cloud Security",{"key":392,"name":393,"field":143},"devsecops","DevSecOps",{"key":395,"name":396,"field":143},"blue-team-incident","Blue Team \u002F Incident",{"key":398,"name_tr":399,"name_en":400,"sort":401,"specializations":402},"qa-test-automation","QA \u002F Test Otomasyonu","QA \u002F Test Automation",9,[403],{"key":257,"name":258,"field":398},{"key":405,"name_tr":406,"name_en":406,"sort":407,"specializations":408},"data-engineer","Data Engineer",10,[409],{"key":257,"name":258,"field":405},{"key":411,"name_tr":412,"name_en":413,"sort":414,"specializations":415},"game-dev","Oyun Geliştirme","Game Development",11,[416],{"key":257,"name":258,"field":411},{"key":418,"name_tr":419,"name_en":419,"sort":420,"specializations":421},"ml-engineer","ML Engineer",12,[422],{"key":257,"name":258,"field":418},[14,15,16],{"junior":425,"mid":427,"senior":428},{"questions":426,"median_sec":3},20,{"questions":426,"median_sec":3},{"questions":426,"median_sec":3},[430,10],"tr",[432,433],"google","github",21750,true]