{"id":13750352,"url":"https://github.com/reactjs/react-php-v8js","last_synced_at":"2025-09-30T04:32:28.012Z","repository":{"id":14008863,"uuid":"16710350","full_name":"reactjs/react-php-v8js","owner":"reactjs","description":"PHP library that renders React components on the server","archived":true,"fork":false,"pushed_at":"2018-08-02T19:34:15.000Z","size":33,"stargazers_count":1328,"open_issues_count":16,"forks_count":127,"subscribers_count":69,"default_branch":"master","last_synced_at":"2024-12-30T07:42:24.173Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reactjs.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}},"created_at":"2014-02-10T21:41:39.000Z","updated_at":"2024-11-07T06:18:30.000Z","dependencies_parsed_at":"2022-08-28T20:50:48.904Z","dependency_job_id":null,"html_url":"https://github.com/reactjs/react-php-v8js","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactjs%2Freact-php-v8js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactjs%2Freact-php-v8js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactjs%2Freact-php-v8js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactjs%2Freact-php-v8js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reactjs","download_url":"https://codeload.github.com/reactjs/react-php-v8js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234702092,"owners_count":18873828,"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-03T08:00:29.308Z","updated_at":"2025-09-30T04:32:27.736Z","avatar_url":"https://github.com/reactjs.png","language":"PHP","funding_links":[],"categories":["Awesome React","PHP"],"sub_categories":["Tools"],"readme":"React-PHP-V8Js\n===========\n\nReact-PHP-V8Js is an experimental library that uses the power of Facebook's\n[React](http://facebook.github.io/react/) library to render UI components\non the server-side with PHP as well as on the client.\n\nPrerequisites\n===========\n* Server running PHP 5.3.3+\n* [V8Js PHP extension](http://php.net/v8js)\n\nFor a walkthrough how to setup V8Js PHP extension, use the links below:\n\n- [On Linux](https://github.com/preillyme/v8js/blob/master/README.Linux.md)\n- [On MacOS](https://github.com/preillyme/v8js/blob/master/README.MacOS.md)\n- [On Windows](https://github.com/preillyme/v8js/blob/master/README.Win32.md)\n\nUsage\n===========\n```php\n// the library\n$react_source = file_get_contents('/path/to/build/react.js');\n// all custom code concatenated\n$app_source = file_get_contents('/path/to/custom/components.js');\n\n$rjs = new ReactJS($react_source, $app_source);\n$rjs-\u003esetComponent('MyComponent', array(\n  'any'   =\u003e  1,\n  'props' =\u003e  2\n  )\n);\n\n/// ...\n\n// print rendered markup\necho '\u003cdiv id=\"here\"\u003e' . $rjs-\u003egetMarkup() . '\u003c/div\u003e';\n\n/// ...\n\n// load JavaScript somehow - concatenated, from CDN, etc\n// including react.js and custom/components.js\n\n// init client\necho '\u003cscript\u003e' . $rjs-\u003egetJS(\"#here\") . '\u003c/script\u003e'; \n\n/// ...\n\n// repeat setComponent(), getMarkup(), getJS() as necessary\n// to render more components\n```\n\nLicense\n=======\nBSD License for React-PHP-V8Js\n\nCopyright (c) 2014, Facebook, Inc. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name Facebook nor the names of its contributors may be used to\n   endorse or promote products derived from this software without specific\n   prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactjs%2Freact-php-v8js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freactjs%2Freact-php-v8js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactjs%2Freact-php-v8js/lists"}