3v4l.org

run code in 500+ PHP versions simultaneously
<?php $liste = [ ['name' => 'Elsa', 'job' => 'Student', 'springbreak' => 'true' ], ['name' => 'Chris', 'job' => 'Teacher', 'springbreak' => 'true' ], ['name' => 'Zob', 'job' => 'Student', 'springbreak' => 'false' ], ['name' => 'Ken', 'job' => 'Teacher', 'springbreak' => 'true' ], ['name' => 'Ryan', 'job' => 'Student', 'springbreak' => 'false' ], ['name' => 'Tenta', 'job' => 'Teacher', 'springbreak' => 'true' ] ]; // Filter to only keep values with springbreak to true $springbreak_only = array_filter($liste, function($entry) { return $entry['springbreak'] === 'true'; }); // Get the names only $springbreak_names = array_map(function($entry) { return $entry['name']; }, $springbreak_only); echo join(', ', $springbreak_names);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E77vm
function name:  (null)
number of ops:  19
compiled vars:  !0 = $liste, !1 = $springbreak_only, !2 = $springbreak_names
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
   13     1        INIT_FCALL                                                   'array_filter'
          2        SEND_VAR                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          4        SEND_VAL                                                     ~4
          5        DO_ICALL                                             $5      
          6        ASSIGN                                                       !1, $5
   15     7        INIT_FCALL                                                   'array_map'
          8        DECLARE_LAMBDA_FUNCTION                              ~7      [1]
          9        SEND_VAL                                                     ~7
         10        SEND_VAR                                                     !1
         11        DO_ICALL                                             $8      
         12        ASSIGN                                                       !2, $8
   17    13        INIT_FCALL                                                   'join'
         14        SEND_VAL                                                     '%2C+'
         15        SEND_VAR                                                     !2
         16        DO_ICALL                                             $10     
         17        ECHO                                                         $10
         18      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E77vm
function name:  {closure:/in/E77vm:13}
number of ops:  5
compiled vars:  !0 = $entry
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
          1        FETCH_DIM_R                                          ~1      !0, 'springbreak'
          2        IS_IDENTICAL                                         ~2      ~1, 'true'
          3      > RETURN                                                       ~2
          4*     > RETURN                                                       null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E77vm
function name:  {closure:/in/E77vm:15}
number of ops:  4
compiled vars:  !0 = $entry
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   RECV                                                 !0      
          1        FETCH_DIM_R                                          ~1      !0, 'name'
          2      > RETURN                                                       ~1
          3*     > RETURN                                                       null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.71 ms | 2188 KiB | 16 Q