php-parser alternatives and similar libraries
Based on the "Editors" category.
Alternatively, view php-parser alternatives based on common mentions on social networks and blogs.
-
quill
Quill is a modern WYSIWYG editor built for compatibility and extensibility. -
slate
A completely customizable framework for building rich text editors. (Currently in beta.) -
Quasar Framework
Quasar Framework - Build high-performance VueJS user interfaces in record time -
TOAST UI Editor
๐๐ Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible. -
medium-editor
Medium.com WYSIWYG editor clone. Uses contenteditable API to implement a rich text solution. -
TinyMCE
The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular -
jsoneditor
A web-based tool to view, edit, format, and validate JSON -
CKEditor 5
Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing. -
SimpleMDE
A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking. -
bootstrap-wysiwyg
Tiny bootstrap-compatible WYSIWYG rich text editor. -
wysihtml5
Open source rich text editor based on HTML5 and the progressive-enhancement approach. Uses a sophisticated security concept and aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles. -
Froala Editor
The next generation Javascript WYSIWYG HTML Editor. -
Trumbowyg
A lightweight and amazing WYSIWYG JavaScript editor under 10kB -
EpicEditor
EpicEditor is an embeddable JavaScript Markdown editor with split fullscreen editing, live previewing, automatic draft saving, offline support, and more. For developers, it offers a robust API, can be easily themed, and allows you to swap out the bundled Markdown parser with anything you throw at it. -
ContentTools
A JS library for building WYSIWYG editors for HTML content. -
jquery-notebook
A modern, simple and elegant WYSIWYG rich text editor. -
Mobiledoc Kit
A toolkit for building WYSIWYG editors with Mobiledoc -
ckeditor-releases
Official distribution releases of CKEditor 4. -
Monod
:notebook: Our cool, secure, and offline-first Markdown editor. -
Materio Free Vuetify VueJS Admin Template
Production Ready, Carefully Crafted, Extensive Vuetifty Free Admin Template ๐คฉ -
Bangle.dev
Collection of higher level rich text editing tools. It powers the local only note taking app https://bangle.io -
Everright-formEditor
A visual low code form editor based on vue, The PC depends on element-plus while the mobile depends on vant. It provides an easy way to create custom forms. The project is extensible, easy to use and configure, and provides many commonly used form components and functions -
walker.js
Simple & lightweight tracking implementation layer based on attributes -
Zepcode
โ๏ธ Zeplin extension that generates Swift snippets from colors, fonts, and layers -
#<Sawyer::Resource:0x00007fbac98da410>
Basic operations on iterables -
React Chat UI
Build your own chat UI with React components in a few minutes. Chat UI Kit from minchat.io is an open source UI toolkit for developing web chat applications. -
react-component-widget
Component for resizing and repositioning charts, parsing transferred data when working with Recharts library.
AWS Cloud-aware infrastructure-from-code toolbox [NEW]
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of php-parser or a related project?
README
php-parser This JavaScript library parses PHP code and converts it to an AST.
Installation
This library is distributed with npm :
npm install php-parser --save
Usage
// initialize the php parser factory class
const fs = require("fs");
const path = require("path");
const engine = require("php-parser");
// initialize a new parser instance
const parser = new engine({
// some options :
parser: {
extractDoc: true,
php7: true,
},
ast: {
withPositions: true,
},
});
// Retrieve the AST from the specified source
const eval = parser.parseEval('echo "Hello World";');
// Retrieve an array of tokens (same as php function token_get_all)
const tokens = parser.tokenGetAll('<?php echo "Hello World";');
// Load a static file (Note: this file should exist on your computer)
const phpFile = fs.readFileSync("./example.php");
// Log out results
console.log("Eval parse:", eval);
console.log("Tokens parse:", tokens);
console.log("File parse:", parser.parseCode(phpFile));
Sample AST output
{
'kind': 'program',
'children': [
{
'kind': 'echo',
'arguments': [
{
'kind': 'string',
'isDoubleQuote': true,
'value': 'Hello World'
}
]
}
]
}
- Try it online (demo) : http://glayzzle.com/php-parser/
- Or from AST Explorer : https://astexplorer.net/
API Overview
The main API exposes a class with the following methods :
- parseEval(String|Buffer) : parse a PHP code in eval style mode (without php open tags)
- parseCode(String|Buffer, String filename) : parse a PHP code by using php open tags.
- tokenGetAll(String|Buffer) : retrieves a list of all tokens from the specified input.
You can also pass options that change the behavior of the parser/lexer.
Documentation
Related projects
- prettier/plugin-php : Prettier PHP Plugin
- babel-preset-php : Babel preset for converting PHP syntax to JavaScript. It can run subset of PHP in the browser or in Node.js
- wp-pot : Generate pot file for WordPress plugins and themes
- crane : PHP Intellisense/code-completion for VS Code
- php-unparser : Produce code that uses the style format recommended by PSR-1 and PSR-2.
- php-writer : Update PHP scripts from their AST
- ts-php-inspections : Provide PHP code inspections written in typescript
- php-reflection : Reflection API for PHP files
- vscode-phpunit : vscode phpunit extension
- lua2php : a Lua to PHP transpiler
You can add here your own project by opening an issue request.
License
This library is released under BSD-3 license clause.
*Note that all licence references and agreements mentioned in the php-parser README section above
are relevant to that project's source code only.