3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dedupe(array $foo) { return $foo; } // Input & Output Streams $input = fopen("php://stdin", "r"); $output = fopen("php://stdout","w"); // Count Arguments $argument_count = 0; fscanf($input, "%d", $argument_count); // Argument Values $arguments = []; for ($i=0; $i < $argument_count; $i++) { $arguments[] = json_decode(trim(fgets($input)), true, 16); } // Run Candidate Code $result = call_user_func_array('dedupe', $arguments); // Output Result fwrite($output, json_encode($result)); fclose($output);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 19
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 19
Branch analysis from position: 35
Branch analysis from position: 19
filename:       /in/vtW5f
function name:  (null)
number of ops:  51
compiled vars:  !0 = $input, !1 = $output, !2 = $argument_count, !3 = $arguments, !4 = $i, !5 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'php%3A%2F%2Fstdin'
          2        SEND_VAL                                                 'r'
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !0, $6
   10     5        INIT_FCALL                                               'fopen'
          6        SEND_VAL                                                 'php%3A%2F%2Fstdout'
          7        SEND_VAL                                                 'w'
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !1, $8
   13    10        ASSIGN                                                   !2, 0
   14    11        INIT_FCALL                                               'fscanf'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 '%25d'
         14        SEND_REF                                                 !2
         15        DO_ICALL                                                 
   17    16        ASSIGN                                                   !3, <array>
   18    17        ASSIGN                                                   !4, 0
         18      > JMP                                                      ->33
   19    19    >   INIT_FCALL                                               'json_decode'
         20        INIT_FCALL                                               'trim'
         21        INIT_FCALL                                               'fgets'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $15     
         24        SEND_VAR                                                 $15
         25        DO_ICALL                                         $16     
         26        SEND_VAR                                                 $16
         27        SEND_VAL                                                 <true>
         28        SEND_VAL                                                 16
         29        DO_ICALL                                         $17     
         30        ASSIGN_DIM                                               !3
         31        OP_DATA                                                  $17
   18    32        PRE_INC                                                  !4
         33    >   IS_SMALLER                                               !4, !2
         34      > JMPNZ                                                    ~19, ->19
   23    35    >   INIT_FCALL                                               'dedupe'
         36        SEND_ARRAY                                               !3
         37        CHECK_UNDEF_ARGS                                         
         38        DO_FCALL                                      0  $20     
         39        ASSIGN                                                   !5, $20
   26    40        INIT_FCALL                                               'fwrite'
         41        SEND_VAR                                                 !1
         42        INIT_FCALL                                               'json_encode'
         43        SEND_VAR                                                 !5
         44        DO_ICALL                                         $22     
         45        SEND_VAR                                                 $22
         46        DO_ICALL                                                 
   27    47        INIT_FCALL                                               'fclose'
         48        SEND_VAR                                                 !1
         49        DO_ICALL                                                 
         50      > RETURN                                                   1

Function dedupe:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vtW5f
function name:  dedupe
number of ops:  3
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1      > RETURN                                                   !0
    6     2*     > RETURN                                                   null

End of function dedupe

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.88 ms | 1403 KiB | 30 Q