{"library":"phply","title":"phply","description":"A lexer and parser for PHP source code implemented using PLY (Python Lex-Yacc). Provides a tokenizer, parser, and AST representation for PHP. Current version 1.2.6, release cadence is sporadic.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install phply"],"cli":null},"imports":["from phply import phpast","from phply import phplex","from phply import phpparse"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from phply import phplex, phpparse\nfrom phply import phpast as ast\ncode = '<?php echo \"Hello, World!\"; ?>'\ntokens = list(phplex.lex(code))\nprint('Tokens:', tokens)\nparser = phpparse.make_parser()\nparsetree = parser.parse(code, lexer=phplex.lexer)\nprint('AST:', parsetree)","lang":"python","description":"Basic usage: tokenize and parse a PHP snippet.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}