-
Run This to get Collation Path
SHOW VARIABLES LIKE 'character_sets_dir';
-
in
/collation/path/Index.xml
add this to<charset name="utf8">
section
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function checkIfBalanced($string) | |
{ | |
$stack = []; | |
$matches = ["(" => ")", "{" => "}", "[" => "]"]; | |
for ($i = 0; $i < strlen($string); $i++) { | |
$currentChar = $string[$i]; | |
//balanced not start with a closure before start | |
if (!count($stack) && in_array($currentChar, array_values($matches))) | |
return false; |