3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( 0 => array ( 'rating_id' => 'rwp_rating_5b4da83f6b281', 'rating_post_id' => 343, 'rating_review_id' => '0', 'rating_score' => array ( 0 => 2.0, 1 => 2.0, 2 => 3.5, ), 'rating_user_id' => 0, 'rating_user_name' => 'Joep van Dongen', 'rating_user_email' => 'dongen.van.joep@gmail.com', 'rating_title' => 'Dit is een test beoordeling', 'rating_comment' => 'Dit is een test beoordeling', 'rating_images' => array ( ), 'rating_date' => 1531815999, 'rating_status' => 'published', 'rating_verified' => false, 'rating_template' => 'rwp_template_5b16a33aa16b7', 'rating_privacy' => array ( ), ), 1 => array ( 'rating_id' => 'rwp_rating_5bd0271605392', 'rating_post_id' => 343, 'rating_review_id' => '0', 'rating_score' => array ( 0 => 5.0, 1 => 5.0, 2 => 5.0, ), 'rating_user_id' => 4, 'rating_user_name' => '', 'rating_user_email' => '', 'rating_title' => 'Harry de Vries', 'rating_comment' => 'Dit is een testreview om te kijken of et werkrty', 'rating_images' => array ( ), 'rating_date' => 1540368150, 'rating_status' => 'published', 'rating_verified' => false, 'rating_template' => 'rwp_template_5b16a33aa16b7', 'rating_privacy' => array ( 't5bab7c0abed1f' => 'true', ), ), ); $new = array_intersect_key($arr,array_intersect(array_column($arr, 'rating_post_id'), [343])); Var_dump($new); Echo count($new);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AWDEf
function name:  (null)
number of ops:  20
compiled vars:  !0 = $arr, !1 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_intersect_key'
          2        SEND_VAR                                                 !0
          3        INIT_FCALL                                               'array_intersect'
          4        INIT_FCALL                                               'array_column'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'rating_post_id'
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        SEND_VAL                                                 <array>
         10        DO_ICALL                                         $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                         $5      
         13        ASSIGN                                                   !1, $5
    6    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
    7    17        COUNT                                            ~8      !1
         18        ECHO                                                     ~8
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.46 ms | 1008 KiB | 17 Q