PHP code example of asm89 / plusminus-parser

1. Go to this page and download the library: Download asm89/plusminus-parser library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

asm89 / plusminus-parser example snippets


$parser = new Asm89\PlusMinus\MessageParser([
    new Asm89\PlusMinus\WordMatcher(0),
    new Asm89\PlusMinus\BracketMatcher(1), // bracket items take priority
]):

/** @return null|Item */
$item = $parser->parse($message);

// item API
$item->getValue();
$item->isMinus();
$item->isPlus();