42 - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of 42.php
- <?php
- /*public class Combination {
- static void combinations2(array[] $arr, int $len, int $startPosition, array $result):void{
- if ($len == 0){
- print_r($result);
- return;
- }
- for ( $i = $startPosition; $i <= $arr-len; i++){
- $result[sizeOf($result) - len] = arr[i];
- combinations2(arr, len-1, i+1, result);
- }
- }
- }
- */
- $arr = ["A","B","C","D","E","F"];
- print_r($arr);
- $comb=new Combination();
- /*
- $comb->combinations2(arr, 3, 0, new String[3]);