3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array('status'=>'OK','Productname'=>'test1'), array('status'=>'OK','Productname'=>'test1'), array('status'=>'OK','Productname'=>'test2'), array('status'=>'OK','Productname'=>'test2') ); $notToDuplicate = array('test1'); $counts = array_count_values($arr); var_dump($counts); $unique = array_unique($arr, SORT_REGULAR); //$newArray = array_fill(0, $counts['apple']-2, 'apple');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/stJ0S
function name:  (null)
number of ops:  15
compiled vars:  !0 = $arr, !1 = $notToDuplicate, !2 = $counts, !3 = $unique
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   11     2        INIT_FCALL                                               'array_count_values'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !2, $6
   12     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                                 
   14     9        INIT_FCALL                                               'array_unique'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 0
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !3, $9
   15    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.83 ms | 1394 KiB | 19 Q