Skip to content

cloudflare/php-worker-hello-world

PHP hello world for Cloudflare Workers

Your PHP code in index.php, running on Cloudflare Workers

This project uses babel-preset-php to convert PHP to JavaScript.

Wrangler

To generate using wrangler

wrangler generate projectname https://github.com/cloudflare/php-worker-hello-world

Further documentation for Wrangler can be found here.

babel-preset-php

cd projectname

# run once to install babel-preset-php and dependencies
npm install

# run every time you update index.php
npm run build

That will compile your code into index.js, after which you can run wrangler publish to push it to Cloudflare.

For more information on how PHP translates to JavaScript, see the docs for babel-preset-php.

About

No description, website, or topics provided.

Resources

License

Apache-2.0 and 2 other licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages