3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Users = Array( 0 => Array ( 'id' => '100', 'name' => 'Name & Surname', 'email' => 'email@email.com', 'age' => '25', 'gender' => 'male', 'registration_date' => '2019-01-03', 'licence_expiry_date' => '2019-09-03', ), 1 => Array ( 'id' => '101', 'name' => 'Name & Surname 1', 'email' => 'email1@email.com', 'age' => '22', 'gender' => 'male', 'registration_date' => '2019-03-03', 'licence_expiry_date' => '2019-02-03', ), 2 => Array ( 'id' => '102', 'name' => 'Name & Surname 1', 'email' => 'email1@email.com', 'age' => '25', 'gender' => 'male', 'registration_date' => '2019-01-03', 'licence_expiry_date' => '2019-09-03', ), 3 => Array ( 'id' => '103', 'name' => 'Name & Surname 3', 'email' => 'email3@email.com', 'age' => '25', 'gender' => 'male', 'registration_date' => '2019-08-03', 'licence_expiry_date' => '2019-10-03', ), 4 => Array ( 'id' => '103', 'name' => 'Name & Surname 4', 'email' => 'email4@email.com', 'age' => '18', 'gender' => 'female', 'registration_date' => '2018-01-03', 'licence_expiry_date' => '2019-12-03', ), ); $UsersFiltered = array_filter($Users, function ($v) { return $v['age'] == 25 && $v['registration_date'] >= '2019-01-01' && $v['licence_expiry_date'] <= '2019-10-01'; }); var_export($UsersFiltered);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sRb1t
function name:  (null)
number of ops:  11
compiled vars:  !0 = $Users, !1 = $UsersFiltered
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   60     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   62     4        SEND_VAL                                                 ~3
   60     5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   64     7        INIT_FCALL                                               'var_export'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
Branch analysis from position: 7
filename:       /in/sRb1t
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   60     0  E >   RECV                                             !0      
   61     1        FETCH_DIM_R                                      ~1      !0, 'age'
          2        IS_EQUAL                                         ~2      ~1, 25
          3      > JMPZ_EX                                          ~2      ~2, ->7
          4    >   FETCH_DIM_R                                      ~3      !0, 'registration_date'
          5        IS_SMALLER_OR_EQUAL                              ~4      '2019-01-01', ~3
          6        BOOL                                             ~2      ~4
          7    > > JMPZ_EX                                          ~2      ~2, ->11
          8    >   FETCH_DIM_R                                      ~5      !0, 'licence_expiry_date'
          9        IS_SMALLER_OR_EQUAL                              ~6      ~5, '2019-10-01'
         10        BOOL                                             ~2      ~6
         11    > > RETURN                                                   ~2
   62    12*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.29 ms | 1002 KiB | 15 Q