3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 'id93294' => [ 'Name' => 'Tom Anderson 2', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Matrix' ], 'id29349' => [ 'Name' => 'Tom Anderson 1', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Matrix' ], 'id29348' => [ 'Name' => 'Neo', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Real World' ], 'id29346' => [ 'Name' => 'Neo', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'Zion' ], 'id29338' => [ 'Name' => 'Tank', 'Birthday' => '04/20/1973', 'Hometown' => 'Zion', 'CurrentLocation' => 'Zion' ], 'id29342' => [ 'Name' => 'Trinity', 'Birthday' => '08/09/1979', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Real World' ] ]; uasort($array, function($a, $b) { return [strtotime($a['Birthday']), $a['Hometown'] !== $a['CurrentLocation'], $a['Name']] <=> [strtotime($b['Birthday']), $b['Hometown'] !== $b['CurrentLocation'], $b['Name']]; }); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gi9kkj
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   42     1        INIT_FCALL                                                   'uasort'
          2        SEND_REF                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   46     4        SEND_VAL                                                     ~2
   42     5        DO_ICALL                                                     
   47     6        INIT_FCALL                                                   'var_export'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                                     
          9      > 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/Gi9kkj
function name:  {closure:/in/Gi9kkj:42}
number of ops:  27
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   42     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   43     2        INIT_FCALL                                                   'strtotime'
          3        FETCH_DIM_R                                          ~2      !0, 'Birthday'
          4        SEND_VAL                                                     ~2
          5        DO_ICALL                                             $3      
          6        INIT_ARRAY                                           ~4      $3
          7        FETCH_DIM_R                                          ~5      !0, 'Hometown'
          8        FETCH_DIM_R                                          ~6      !0, 'CurrentLocation'
          9        IS_NOT_IDENTICAL                                     ~7      ~5, ~6
         10        ADD_ARRAY_ELEMENT                                    ~4      ~7
         11        FETCH_DIM_R                                          ~8      !0, 'Name'
         12        ADD_ARRAY_ELEMENT                                    ~4      ~8
   45    13        INIT_FCALL                                                   'strtotime'
         14        FETCH_DIM_R                                          ~9      !1, 'Birthday'
         15        SEND_VAL                                                     ~9
         16        DO_ICALL                                             $10     
         17        INIT_ARRAY                                           ~11     $10
         18        FETCH_DIM_R                                          ~12     !1, 'Hometown'
         19        FETCH_DIM_R                                          ~13     !1, 'CurrentLocation'
         20        IS_NOT_IDENTICAL                                     ~14     ~12, ~13
         21        ADD_ARRAY_ELEMENT                                    ~11     ~14
         22        FETCH_DIM_R                                          ~15     !1, 'Name'
         23        ADD_ARRAY_ELEMENT                                    ~11     ~15
         24        SPACESHIP                                            ~16     ~4, ~11
         25      > RETURN                                                       ~16
   46    26*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
228.94 ms | 2338 KiB | 16 Q