# php-webview **Repository Path**: chopins/php-webview ## Basic Information - **Project Name**: php-webview - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-18 - **Last Updated**: 2025-07-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PHP WebView **Php WebView Library** PHP bindings for [zserge's Webview](https://github.com/webview/webview) ## Installation ```shell composer require 0hr/php-webview ``` ## Examples ### Hello World Application [Example](https://github.com/0hr/php-webview/tree/main/examples/helloworld) ```php #!/usr/bin/env php setHTML('
Hello World
'); $webview->run(); $webview->destroy(); ``` ### Bindings [Example](https://github.com/0hr/php-webview/tree/main/examples/bindings) ```php $webview->bind('save', function ($seq, $req, $context) use (&$list) { $name = $req[0]; $lastname = $req[1]; if (empty($name) || empty($lastname)) { return ['name' => empty($name), 'lastname' => empty($lastname)]; } else { $list[] = ['name' => $name, 'lastname' => $lastname]; } return []; }); $webview->bind('getList', function ($seq, $req, $context) use ($webview, &$list) { $webview->returnValue($seq, 0, $list); }); ``` ## Building For prerequisites, read [The link](https://github.com/webview/webview#prerequisites) To build the library, run **src/webview/build.sh** on Unix-based systems, **src/webview/build.bat** on Windows