Declaration and initialization of counter array
$ counter1 = array_fill ( 0 , $ MAX , NULL ) ; $ counter2 = array_fill ( 0 , $ MAX , NULL ) ; for ( $ i = 0 ; $ i < $ l / 2 ; $ i ++ ) $ counter1 [ ord ( $ str [ $ i ] ) - ord ( ' a ' ) ] ++ ; for ( $ i = $ l / 2 ; $ i < $ l ; $ i ++ ) $ counter2 [ ord ( $ str [ $ i ] ) - ord ( ' a ' ) ] ++ ; for ( $ i = 0 ; $ i < $ MAX ; $ i ++ ) if ( $ counter2 [ $ i ] != $ counter1 [ $ i ] ) return true ; return false ; }