3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Complete the crosswordPuzzle function below. function crosswordPuzzle($crossword, $words) { } $fptr = fopen(getenv("OUTPUT_PATH"), "w"); $stdin = fopen("php://stdin", "r"); $crossword = array(); for ($i = 0; $i < 10; $i++) { $crossword_item = ''; fscanf($stdin, "%[^\n]", $crossword_item); $crossword[] = $crossword_item; } $words = ''; fscanf($stdin, "%[^\n]", $words); $result = crosswordPuzzle($crossword, $words); fwrite($fptr, implode("\n", $result) . "\n"); fclose($stdin); fclose($fptr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 16
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 16
Branch analysis from position: 27
Branch analysis from position: 16
filename:       /in/uGC9b
function name:  (null)
number of ops:  54
compiled vars:  !0 = $fptr, !1 = $stdin, !2 = $crossword, !3 = $i, !4 = $crossword_item, !5 = $words, !6 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'fopen'
          1        INIT_FCALL                                               'getenv'
          2        SEND_VAL                                                 'OUTPUT_PATH'
          3        DO_ICALL                                         $7      
          4        SEND_VAR                                                 $7
          5        SEND_VAL                                                 'w'
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !0, $8
   11     8        INIT_FCALL                                               'fopen'
          9        SEND_VAL                                                 'php%3A%2F%2Fstdin'
         10        SEND_VAL                                                 'r'
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !1, $10
   13    13        ASSIGN                                                   !2, <array>
   15    14        ASSIGN                                                   !3, 0
         15      > JMP                                                      ->25
   16    16    >   ASSIGN                                                   !4, ''
   17    17        INIT_FCALL                                               'fscanf'
         18        SEND_VAR                                                 !1
         19        SEND_VAL                                                 '%25%5B%5E%0A%5D'
         20        SEND_REF                                                 !4
         21        DO_ICALL                                                 
   18    22        ASSIGN_DIM                                               !2
         23        OP_DATA                                                  !4
   15    24        PRE_INC                                                  !3
         25    >   IS_SMALLER                                               !3, 10
         26      > JMPNZ                                                    ~18, ->16
   21    27    >   ASSIGN                                                   !5, ''
   22    28        INIT_FCALL                                               'fscanf'
         29        SEND_VAR                                                 !1
         30        SEND_VAL                                                 '%25%5B%5E%0A%5D'
         31        SEND_REF                                                 !5
         32        DO_ICALL                                                 
   24    33        INIT_FCALL                                               'crosswordpuzzle'
         34        SEND_VAR                                                 !2
         35        SEND_VAR                                                 !5
         36        DO_FCALL                                      0  $21     
         37        ASSIGN                                                   !6, $21
   26    38        INIT_FCALL                                               'fwrite'
         39        SEND_VAR                                                 !0
         40        INIT_FCALL                                               'implode'
         41        SEND_VAL                                                 '%0A'
         42        SEND_VAR                                                 !6
         43        DO_ICALL                                         $23     
         44        CONCAT                                           ~24     $23, '%0A'
         45        SEND_VAL                                                 ~24
         46        DO_ICALL                                                 
   28    47        INIT_FCALL                                               'fclose'
         48        SEND_VAR                                                 !1
         49        DO_ICALL                                                 
   29    50        INIT_FCALL                                               'fclose'
         51        SEND_VAR                                                 !0
         52        DO_ICALL                                                 
         53      > RETURN                                                   1

Function crosswordpuzzle:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uGC9b
function name:  crosswordPuzzle
number of ops:  3
compiled vars:  !0 = $crossword, !1 = $words
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2      > RETURN                                                   null

End of function crosswordpuzzle

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.66 ms | 1023 KiB | 20 Q