{"id":13649505,"url":"https://github.com/sgolemon/table-flip","last_synced_at":"2025-04-04T21:11:12.363Z","repository":{"id":57048534,"uuid":"59719001","full_name":"sgolemon/table-flip","owner":"sgolemon","description":"Not the exceptions we need, but the ones we deserve.","archived":false,"fork":false,"pushed_at":"2017-10-08T15:47:06.000Z","size":14,"stargazers_count":338,"open_issues_count":0,"forks_count":7,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-28T20:11:46.178Z","etag":null,"topics":["exceptions","php","silly"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/sgolemon/table-flip","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/sgolemon.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}},"created_at":"2016-05-26T04:10:47.000Z","updated_at":"2025-02-16T04:22:29.000Z","dependencies_parsed_at":"2022-08-23T19:10:30.375Z","dependency_job_id":null,"html_url":"https://github.com/sgolemon/table-flip","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolemon%2Ftable-flip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolemon%2Ftable-flip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolemon%2Ftable-flip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolemon%2Ftable-flip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgolemon","download_url":"https://codeload.github.com/sgolemon/table-flip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249532,"owners_count":20908212,"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":["exceptions","php","silly"],"created_at":"2024-08-02T02:00:17.788Z","updated_at":"2025-04-04T21:11:12.346Z","avatar_url":"https://github.com/sgolemon.png","language":"PHP","readme":"Inspired by Adam Harvey: https://twitter.com/LGnome/status/735573024825430016\n\n`if ($situation === SHIT::HAPPENED) {（╯°□°）╯︵┻━┻(); }`\n\nUsages:\n  * throw new （╯°□°）╯︵┻━┻; // TableFlip\n  * throw new （ノ゜Д゜）ノ︵┻━┻; // PudgyTableFlip\n  * throw new （ノಥ益ಥ）ノ︵┻━┻; // AgroTableFlip\n  * （╯°□°）╯︵┻━┻(); // Function shorthand\n  * assert(（╯°□°）╯︵┻━┻() ); // Use in an assert to only flip in dev\n\nAll three table-flip classes extend \\Exception and implement the ┻━┻ interface,\nso the following works:\n\n```\ntry {\n  $ret = doSomething();\n  if ($ret === null) {\n    throw new （╯°□°）╯︵┻━┻;\n  } elseif ($ret === false) {\n    throw new （ノಥ益ಥ）ノ︵┻━┻;\n  } elseif (!is_string($ret)) {\n    throw new （ノ゜Д゜）ノ︵┻━┻;\n  }\n} catch (┻━┻ $e) {\n  ┬─┬﻿ノ（･_･ノ）;\n}\n```\n\nNote that the parentheses used in the class/function names here are\nU+FF08 FULLWIDTH LEFT PARENTHESIS and U+FF09 FULLWIDTH RIGHT PARENTHESIS\nsince normal parens (U+0028/U+0029) are not allowed in PHP labels.\n\nSimilarly, the customary space is omitted entirely to make this a valid PHP label.\n","funding_links":[],"categories":["PHP","Libraries, Frameworks and SDKs"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgolemon%2Ftable-flip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgolemon%2Ftable-flip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgolemon%2Ftable-flip/lists"}