In php, how can I elegantly disrupt a string and then input it (without using arrays )?

Source: Internet
Author: User
The string returned in the background needs to disrupt the character sequence in the string and then output it. I thought of splitting the string into an array and then using the shuffle () of the array to disrupt the array, finally, the array is spliced into a string and then output, but the efficiency is too low. How can we achieve this demand elegantly? The string returned in the background needs to disrupt the character sequence in the string and then output it. I thought of splitting the string into an array and then using the shuffle () of the array to disrupt the array, finally, the array is spliced into a string and then output, but the efficiency is too low. How can we achieve this demand elegantly?

Reply content:

The string returned in the background needs to disrupt the character sequence in the string and then output it. I thought of splitting the string into an array and then using the shuffle () of the array to disrupt the array, finally, the array is spliced into a string and then output, but the efficiency is too low. How can we achieve this demand elegantly?

Echo str_shuffle ('HTTP: // segmentfault.com/q/10379003776023'); // q/20730hg/a70fptlnee6t3s0/11 t/: otucm0020.m0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.