diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-03-28 12:07:19 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-03-28 12:07:19 +0900 |
| commit | 24607cd13b77ae2fd998b506b15f03ba98aa46ec (patch) | |
| tree | 203589ce80f8b7729a5643547aad16873fbf4ac1 | |
| parent | 4efa8ba0c0b749fa37b39393d3c29ac75314cc21 (diff) | |
| download | phphp-24607cd13b77ae2fd998b506b15f03ba98aa46ec.tar.gz phphp-24607cd13b77ae2fd998b506b15f03ba98aa46ec.tar.zst phphp-24607cd13b77ae2fd998b506b15f03ba98aa46ec.zip | |
update readme
| -rw-r--r-- | README.md | 26 | ||||
| -rw-r--r-- | index.php | 4 |
2 files changed, 28 insertions, 2 deletions
@@ -26,6 +26,32 @@ Hello, World! The script, [hello.php](./hello.php), is executed on PHPHP on PHP. +### PHPHP on PHPHP on PHP + +Edit this line as the following: + +```diff + if (defined('PHPHP')) { +- if (PHPHP < 2) { ++ if (PHPHP < 3) { + echo "Running" . str_repeat(" on PHPHP", PHPHP) . " on PHP\n"; +``` + +Then, execute `index.php`. I recommend that you enable JIT. + +```bash +php -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G index.php +``` + +It will execute hello world on PHPHP on PHPHP on PHP. + +``` +Running on PHP +Running on PHPHP on PHP +Running on PHPHP on PHPHP on PHP +Hello, World! +``` + ## Talks [Talk in PHPerKaigi 2025 (in Japanese)](https://fortee.jp/phperkaigi-2025/proposal/ef8480fc-1403-4020-9f24-aca9361f51e4) @@ -1195,8 +1195,8 @@ $env['funcs'] = []; $env['consts'] = []; if (defined('PHPHP')) { - if (PHPHP === 1) { - echo "Running on PHPHP on PHP\n"; + if (PHPHP < 2) { + echo "Running" . str_repeat(" on PHPHP", PHPHP) . " on PHP\n"; $file = './index.php'; } else { $file = './hello.php'; |
