3v4l.org

run code in 300+ PHP versions simultaneously
<?php function no_dupes(array $input_array) { return array_count_values($input_array) === count($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/3FlBJ
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/3FlBJ
function name:  no_dupes
number of ops:  8
compiled vars:  !0 = $input_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'array_count_values'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        COUNT                                            ~2      !0
          5        IS_IDENTICAL                                     ~3      $1, ~2
          6      > RETURN                                                   ~3
    5     7*     > RETURN                                                   null

End of function no_dupes

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.27 ms | 1397 KiB | 18 Q