File: index.php

Recommend this page to a friend!
  Classes of Hakob Hakobyan  >  PHP Bracket Checker Parser  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Bracket Checker Parser
Parse expressions and return if brackets match
Author: By
Last change:
Date: 4 years ago
Size: 388 bytes
 

 

Contents

Class file image Download
<?php
/**
 * Created by PhpStorm.
 * User: hakob
 * Date: 5/9/16
 * Time: 11:57 AM
 */

$s = "({[]})";
$s1 = "({[]})({{}))";
echo
$s1 .' ';
echo
$s .' ';
include
'BracketParser.php';

if(
BracketParser::parse($s)) {
    echo
"Is OK \n";
}else {
    echo
"Wrong bracket series\n";
}
if(
BracketParser::parse($s1)) {
    echo
"Is OK \n";
}else {
    echo
"Wrong bracket series\n";
}


For more information send a message to info at phpclasses dot org.