3v4l.org

run code in 300+ PHP versions simultaneously
<?php $element = array( 0 => array( 'name' => 'test', 'email' => 'aaa@example.com' ), 1 => array( 'name' => 'testing', 'email' => 'aaa@example.com' ), 2 => array( 'name' => 'Jane Doe', 'email' => 'asd@example.com' )); $array = array_map(function($element) { return $element['name']; }, $element); $array2 = (array_count_values($array)); print_r($array2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dSSS0
function name:  (null)
number of ops:  15
compiled vars:  !0 = $element, !1 = $array, !2 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   17     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FdSSS0%3A17%240'
   19     3        SEND_VAL                                                 ~4
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
   17     6        ASSIGN                                                   !1, $5
   21     7        INIT_FCALL                                               'array_count_values'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
   22    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FdSSS0%3A17%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dSSS0
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        FETCH_DIM_R                                      ~1      !0, 'name'
          2      > RETURN                                                   ~1
   19     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FdSSS0%3A17%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.71 ms | 1395 KiB | 19 Q