承接 ininids/aam-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ininids/aam-php

最新稳定版本:2.5.1

Composer 安装命令:

composer require ininids/aam-php

包简介

AAM PHP bindings

README 文档

README

PHP bindings for aam-rs using FFI on top of the stable C API.

What you get

  • Parse AAM from strings.
  • Forward lookup (key -> value) and reverse lookup fallback (value -> key).
  • Simple zero-dependency wrapper class for scripting and prototyping.

Build native library

cargo build --release --features ffi

By default AamDocument reads the library from:

  • AAM_PHP_LIB env var, if present.
  • target/release/libaam_rs.so as fallback on Linux.

Basic usage

<?php

require_once 'php/src/AamPhp.php';

$aam = new RustGames\Aam\AamDocument("host = localhost\nport = 8080", '/absolute/path/to/libaam_rs.so');
echo $aam->get('host');
// localhost

More examples

<?php

require_once 'php/src/AamPhp.php';

$aam = new RustGames\Aam\AamDocument("env = production\nrole = api");

// direct lookup
var_dump($aam->get('env')); // "production"

// key/value lookup with fallback
var_dump($aam->find('production')); // ["env" => "production"]

// missing key
var_dump($aam->get('missing')); // null

Tests

AAM_RS_LIB=target/release/libaam_rs.so php php/tests/smoke.php

The smoke script includes multiple assertions for valid parsing, reverse lookup, missing keys, and invalid input errors.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固