-
php_cli_server_poller_ctor
-
php_cli_server_poller_add
-
php_cli_server_poller_remove
-
php_cli_server_poller_poll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// --- 1. 自己署名証明書+秘密鍵を生成 --- // | |
// OpenSSL 設定(鍵長・鍵タイプ等) | |
$config = [ | |
"private_key_bits" => 2048, | |
"private_key_type" => OPENSSL_KEYTYPE_RSA, | |
]; | |
// 1.1. 秘密鍵を生成 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// --- 1. 自己署名証明書+秘密鍵を生成 --- // | |
// OpenSSL 設定(鍵長・鍵タイプ等) | |
$config = [ | |
"private_key_bits" => 2048, | |
"private_key_type" => OPENSSL_KEYTYPE_RSA, | |
]; | |
// 1.1. 秘密鍵を生成 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 1. 秘密鍵と CSR(証明書署名要求)のオプションを設定 | |
$config = [ | |
"config" => "/etc/ssl/openssl.cnf", // 必要に応じて openssl.cnf へのパスを調整 | |
"private_key_bits" => 2048, // 鍵長 | |
"private_key_type" => OPENSSL_KEYTYPE_RSA, // 鍵タイプ | |
]; | |
// 2. 秘密鍵の生成 | |
$privateKey = openssl_pkey_new($config); |
https://github.com/masakielastic/php-ext-striter
str_iter の実装には PCRE2 JIT が使われています。
php -d extension=modules/striter.so benchmark.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Php, Request } from '@platformatic/php-node'; | |
import path from 'path'; | |
import fs from 'fs'; | |
const phpScript = process.argv[2]; | |
if (!phpScript) { | |
console.error('Usage: node cli.js <php-script>'); | |
process.exit(1); | |
} |