3v4l.org

run code in 500+ PHP versions simultaneously
<?php $check = ['person a','person c']; $data = ['person c','person a','person d','person e']; array_multisort( array_map(fn($v) => in_array($v, $check), $data), $data ); var_export($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y8oZE
function name:  (null)
number of ops:  16
compiled vars:  !0 = $check, !1 = $data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, <array>
    6     2        INIT_FCALL                                                   'array_multisort'
    7     3        INIT_FCALL                                                   'array_map'
          4        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          5        BIND_LEXICAL                                                 ~4, !0
          6        SEND_VAL                                                     ~4
          7        SEND_VAR                                                     !1
          8        DO_ICALL                                             $5      
          9        SEND_VAL                                                     $5
    8    10        SEND_REF                                                     !1
    6    11        DO_ICALL                                                     
   10    12        INIT_FCALL                                                   'var_export'
         13        SEND_VAR                                                     !1
         14        DO_ICALL                                                     
         15      > 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/Y8oZE
function name:  {closure:/in/Y8oZE:7}
number of ops:  5
compiled vars:  !0 = $v, !1 = $check
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
          2        FRAMELESS_ICALL_2                in_array            ~2      !0, !1
          3      > RETURN                                                       ~2
          4*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
152.84 ms | 1880 KiB | 16 Q