hikarine3 / py2php
在PHP中使用Python命名函数
1.0
2019-01-27 19:50 UTC
Requires
- php: >=7.1.0
Requires (Dev)
- phpunit/phpunit: ^7
This package is auto-updated.
Last update: 2024-09-28 08:11:35 UTC
README
此包提供了与Python相同的函数命名,以减少切换成本。尽管由于Python和PHP类型不同,对象函数可能定义为一个函数。
例如:Python:string.lower => PHP:lower(string)
如何安装
将
"require": {
...
"hikarine3/py2php": "*",
...
}
添加到composer.json中
如何使用
$py2php = new Py2php();
$string = "ABC";
print($py2php->lower($string));
支持的功能
php => py2php
strtolower => lower
如何测试
composer test tests;
作者
黑田治
https://sakuhindb.com/、http://minakoe.jp/等网站的管理员
推特