3v4l.org

run code in 300+ PHP versions simultaneously
<?php $users=Array ( 0 => Array ( 'id' => 111, 'name' => 'Sandra Shush', 'sources' => '1234,678,780,199' ), 1 => Array ( 'id' => 112, 'name' => 'Stefanie Mcmohn', 'sources' => '32,99,85' ), 2 => Array ( 'id' => 113, 'name' => 'Michael', 'sources' => '896,1213,1918' ), 3 => Array ( 'id' => 113, 'name' => 'Michael', 'sources' => '72' ) ); print_r(array_map('str_getcsv',array_column($users,'sources'))); $result = array_filter(array_map('str_getcsv',array_column($users,'sources')),function($k,$v){ if(in_array(99,$v)) return $k;}); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h4iGj
function name:  (null)
number of ops:  30
compiled vars:  !0 = $users, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   33     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'array_map'
          3        SEND_VAL                                                 'str_getcsv'
          4        INIT_FCALL                                               'array_column'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'sources'
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
   34    12        INIT_FCALL                                               'array_filter'
         13        INIT_FCALL                                               'array_map'
         14        SEND_VAL                                                 'str_getcsv'
         15        INIT_FCALL                                               'array_column'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 'sources'
         18        DO_ICALL                                         $6      
         19        SEND_VAR                                                 $6
         20        DO_ICALL                                         $7      
         21        SEND_VAR                                                 $7
         22        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fh4iGj%3A34%240'
         23        SEND_VAL                                                 ~8
         24        DO_ICALL                                         $9      
         25        ASSIGN                                                   !1, $9
   36    26        INIT_FCALL                                               'print_r'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fh4iGj%3A34%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h4iGj
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $k, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        INIT_FCALL                                               'in_array'
          3        SEND_VAL                                                 99
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6      > JMPZ                                                     $2, ->8
          7    > > RETURN                                                   !0
          8    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fh4iGj%3A34%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.42 ms | 1400 KiB | 23 Q