{"id":13699938,"url":"https://github.com/shukean/php-toml","last_synced_at":"2025-05-04T18:33:52.494Z","repository":{"id":79871596,"uuid":"61520329","full_name":"shukean/php-toml","owner":"shukean","description":"A php extension for parse toml file","archived":false,"fork":false,"pushed_at":"2017-01-10T02:28:33.000Z","size":36,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-13T06:32:50.744Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/shukean.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-20T05:53:19.000Z","updated_at":"2020-12-12T02:32:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0076d2b-579e-43ca-b8ef-e49ae6867097","html_url":"https://github.com/shukean/php-toml","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shukean%2Fphp-toml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shukean%2Fphp-toml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shukean%2Fphp-toml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shukean%2Fphp-toml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shukean","download_url":"https://codeload.github.com/shukean/php-toml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252382804,"owners_count":21739216,"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-08-02T20:00:46.172Z","updated_at":"2025-05-04T18:33:52.173Z","avatar_url":"https://github.com/shukean.png","language":"C","funding_links":[],"categories":["数据转换"],"sub_categories":[],"readme":"# php-toml\nA php7 extension for parse toml file\n\n## Toml v0.4.0\nhttps://github.com/toml-lang/toml   \n\n## Methods\n\n`array toml_parse_file(string toml_file_name) `  \n`array toml_parse_string(string toml_contents) `  \n### Parameters\n`toml_file_name`: Name of the file read.   \n`toml_contents`: A toml struct string.   \n### Return Values\nThe function returns array or **False** on failure.\n### Errors/Exceptions\nAn E_ERROR level error is generated if toml contents parse fail, file cannot be found.   \nAn E_NOTICE level error is generated if toml contents is empty.\n\n## PHP.ini\n\ntoml.cache_enable = 1/0   \n\nIf enable cache, toml\\_parse_file function will cahce the success result.   \nIf file updated, the file cache will auto reload on the next call.   \n\n## Toml Syntax Supported\n\n### Comment\n1. a full-line comment :  **yes**   \n2. a comment at the end of a line :  **yes**   \n\n### Bool\n1. true / false  : **yes**   \n   *bool value must be lowercase letter*\n\n### Key/Value Pair\n1. bare keys : **yes**   \n2. quoted keys : **yes**     \n3. empty keys: **yes**   \n   *key not defind or empty, the key will replace to index num*\n\n### Integer\n1. normal : **yes**  \n2. positive or negative : **yes**   \n3. large : **yes**  \n   \n *the value will be convert to php long*\n\n### Float   \n1. normal :  **yes**   \n2. positive or negative : **yes**   \n3. large : **yes** \n4. exponent : **yes**   \n *the value will be convert to php double* \n\n### Datetime\n  **Not support**\n\n### String\n\n#### Basic strings\n **yes**   \n *value will be called php function __stripcslashes__*\n\n#### Multi-line basic strings\n **yes**   \n extraneous whitespace : **yes**\n\n\n#### Literal strings\n **yes**  \n\n#### Multi-line literal strings\n **yes**\n\n### Array\n **yes**   \n multiline : **yes**   \n data types fixed : **yes**  (^_^ php is best)   \n\n### Table\n1. normal : **yes**    \n2. qoute key : **no**  (result is not you wanted)   \n3. dots : **yes**   \n\n### Inline Table\n **Not supported**\n\n### Array of Tables\n **yes**  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshukean%2Fphp-toml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshukean%2Fphp-toml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshukean%2Fphp-toml/lists"}