Php Class Variable Array Javascript Length Function