Ensure that when implementing or modifying PHP runtime or std/php functions in the Origami project, the agent always creates a minimal PHP test script under tests/php/ and executes it via the Origami runner (go run ./zy.go ...) to verify behavior end-to-end.
类声明和函数状态共享的正确模式。确保类状态数据存储在类中,方法通过instance字段访问实例状态。用于避免RecursiveDirectoryIterator等类实现中的常见错误。
PHP函数参数和变量列表处理规范。涵盖单个参数、多个参数、引用参数、AST参数等不同类型参数的正确处理方式。用于函数实现和补充时的标准化处理。
Describe how functions are represented, registered, and executed in Origami (user functions and built-ins). Use when the user asks about function behavior, parameters, returns, generators, or wants to update function-related documentation.
Document the execution container (VM), request-level TempVM, and parser-level sub-interpreters (statement parsers) in the Origami PHP runtime. Use when the user asks about the interpreter design, runtime container, or wants to update related documentation.
Document function parameter type syntax and data.Types constraints in the Origami runtime. Use when the user asks about parameter types, union/nullable types, or data package type rules, or wants to update related documentation.