The generateToken method returns an associative array, which can only be printed using print_r, not just print.