3v4l.org

run code in 300+ PHP versions simultaneously
<?php function no_dupes(array $input_array) { return count($input_array) === count(array_flip($input_array)); } var_export(no_dupes([1, 1.5])); // should be true
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7bRXI
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_export'
          1        INIT_FCALL                                               'no_dupes'
          2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function no_dupes:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7bRXI
function name:  no_dupes
number of ops:  9
compiled vars:  !0 = $input_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        COUNT                                            ~1      !0
          2        INIT_FCALL                                               'array_flip'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        COUNT                                            ~3      $2
          6        IS_IDENTICAL                                     ~4      ~1, ~3
          7      > RETURN                                                   ~4
    5     8*     > RETURN                                                   null

End of function no_dupes

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.19 ms | 1000 KiB | 16 Q