3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array['facebook'] = ["facebook_enabled" => 1, "facebook_url" => "https://www.facebook.com/", "facebook_order" => 7]; $array['twitter'] = ["twitter_enabled" => 1, "twitter_url" => "https://www.twitter.com/", "twitter_order" => 3]; usort($array, function($a, $b) { $a = array_values($a); $b = array_values($b); return $a[2] > $b[2]; }); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EQ2s3
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 'facebook'
          1        OP_DATA                                                  <array>
    4     2        ASSIGN_DIM                                               !0, 'twitter'
          3        OP_DATA                                                  <array>
    8     4        INIT_FCALL                                               'usort'
          5        SEND_REF                                                 !0
          6        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   12     7        SEND_VAL                                                 ~3
    8     8        DO_ICALL                                                 
   14     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > 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/EQ2s3
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        INIT_FCALL                                               'array_values'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
   10     6        INIT_FCALL                                               'array_values'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
   11    10        FETCH_DIM_R                                      ~6      !0, 2
         11        FETCH_DIM_R                                      ~7      !1, 2
         12        IS_SMALLER                                       ~8      ~7, ~6
         13      > RETURN                                                   ~8
   12    14*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.18 ms | 1001 KiB | 16 Q