{"id":22785819,"url":"https://github.com/mehralsnix/ext-tinyexpr","last_synced_at":"2025-10-12T08:14:17.461Z","repository":{"id":86097888,"uuid":"247343901","full_name":"MehrAlsNix/ext-tinyexpr","owner":"MehrAlsNix","description":"PHP TinyExpr Binding - Math evaluation for strings.","archived":false,"fork":false,"pushed_at":"2020-03-22T22:21:29.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T08:14:16.678Z","etag":null,"topics":["c-bindings","expression-evaluator","php","php-ext","tinyexpr"],"latest_commit_sha":null,"homepage":"https://mehralsnix.github.io/ext-tinyexpr/","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/MehrAlsNix.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":"2020-03-14T19:55:00.000Z","updated_at":"2020-03-22T22:21:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"59103761-5484-4788-805a-77d1c83bf123","html_url":"https://github.com/MehrAlsNix/ext-tinyexpr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"jasny/skeleton-php-ext","purl":"pkg:github/MehrAlsNix/ext-tinyexpr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrAlsNix%2Fext-tinyexpr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrAlsNix%2Fext-tinyexpr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrAlsNix%2Fext-tinyexpr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrAlsNix%2Fext-tinyexpr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MehrAlsNix","download_url":"https://codeload.github.com/MehrAlsNix/ext-tinyexpr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrAlsNix%2Fext-tinyexpr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010802,"owners_count":26084807,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c-bindings","expression-evaluator","php","php-ext","tinyexpr"],"created_at":"2024-12-11T23:07:48.629Z","updated_at":"2025-10-12T08:14:17.455Z","avatar_url":"https://github.com/MehrAlsNix.png","language":"C","readme":"# PHP TinyExpression\nMath evaluation for strings.\n\n[![Build Status](https://travis-ci.com/MehrAlsNix/ext-tinyexpr.svg?branch=master)](https://travis-ci.com/MehrAlsNix/ext-tinyexpr) [![Build status](https://ci.appveyor.com/api/projects/status/ih0hlmc8dnv3fji9?svg=true)](https://ci.appveyor.com/project/siad007/ext-tinyexpr)\n\n## TinyExpr Binding\n[TinyExpr](https://github.com/codeplea/tinyexpr) Bindings for PHP\n\n\u003e TinyExpr is a very small parser and evaluation library for evaluating math expressions from C\n\n### Installation\n\n#### Linux\n\n```\ngit clone --branch \"master\" --depth 1 https://github.com/MehrAlsNix/ext-tinyexpr.git /tmp/tinyexpression\ncd /tmp/tinyexpression\nphpize\n./configure\nmake\nmake install\necho \"extension=tinyexpression.so\" \u003e /usr/local/etc/php/conf.d/tinyexpression.ini\n```\n\n#### Windows\n\ntbd.\n\n\u003chr\u003e\n\n### Functions\n\n#### tinyexpr_interp\n\u003chr\u003e\n(TinyExpression 0.1.0)\n\u003cbr\u003e\n\u003cbr\u003e\n\ntinyexpr_interp - Evaluate math expressions from a `string`.\n\n##### Description\n```\ntinyexpr_interp ( string $expr ) : float\n```\n\n##### Parameters\n\n\u003cb\u003eexpr\u003c/b\u003e `string`\n\n##### Return Values\n\nReturns the evaluated math expression as a `float`.\n\n##### Examples\n\n```\ndocker-compose build\ndocker-compose up -d\ndocker-compose exec php bash\n```\n\n```\nphp -r \"var_dump(tinyexpr_interp('2*9+8-(5/9)'));\"\n \nfloat(25.444444444444)\n```\n\n```\nphp -r \"var_dump(tinyexpr_interp('sin(0.6)'));\"\n \nfloat(0.56464247339504)\n```\n\nNot parsable expressions will return `NAN`:\n```\nphp -r \"var_dump(tinyexpr_interp('(1+2'), is_nan(tinyexpr_interp('(1+2')));\"\n \nfloat(NAN)\nbool(true)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehralsnix%2Fext-tinyexpr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehralsnix%2Fext-tinyexpr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehralsnix%2Fext-tinyexpr/lists"}