3v4l.org

run code in 500+ PHP versions simultaneously
<?php class WP_Error extends stdClass {} $empty_array = array(); $array = array( 'cat1', 'cat2', 'cat3', 'cat1' ); $error = new WP_Error(); var_dump(array_unique($empty_array)); var_dump(array_unique($array)); var_dump(array_unique($error)); // This is the problem case.
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vUnPH
function name:  (null)
number of ops:  24
compiled vars:  !0 = $empty_array, !1 = $array, !2 = $error
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                       !0, <array>
    6     1        ASSIGN                                                       !1, <array>
    7     2        NEW                                                  $5      'WP_Error'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !2, $5
    9     5        INIT_FCALL                                                   'var_dump'
          6        INIT_FCALL                                                   'array_unique'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                             $8      
          9        SEND_VAR                                                     $8
         10        DO_ICALL                                                     
   10    11        INIT_FCALL                                                   'var_dump'
         12        INIT_FCALL                                                   'array_unique'
         13        SEND_VAR                                                     !1
         14        DO_ICALL                                             $10     
         15        SEND_VAR                                                     $10
         16        DO_ICALL                                                     
   11    17        INIT_FCALL                                                   'var_dump'
         18        INIT_FCALL                                                   'array_unique'
         19        SEND_VAR                                                     !2
         20        DO_ICALL                                             $12     
         21        SEND_VAR                                                     $12
         22        DO_ICALL                                                     
         23      > RETURN                                                       1

Class WP_Error: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
171.81 ms | 3401 KiB | 15 Q