Hello, I need help with php. Found such code:
<?php function pc_permute($items, $perms = array( )) { if (empty($items)) { print join(' ', $perms) . "<br>"; } else { for ($i = count($items) - 1; $i >= 0; --$i) { $newitems = $items; $newperms = $perms; list($foo) = array_splice($newitems, $i, 1); array_unshift($newperms, $foo); pc_permute($newitems, $newperms); } } } print_r(pc_permute(array('1', '2', '3', '4', '5', '6', '7', '8', '9', '0'))); ?> Please help me finish so that you can set a limit of, for example, 3 characters (so that it is approximately 123/567/739) and so that for example it can save to a file.txt, and then the computer thinks for a long time and has little memory. Thank you in advance.