3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( array( 'id' => 1, 'value' => 1.2 ), array( 'id' => 2, 'value' => 2.5 ), array( 'id' => 3, 'value' => 'N/A' ) ); usort($data, fn($a, $b) => [$b['value'] !== 'N/A', $b['value']] <=> [$a['value'] !== 'N/A', $a['value']]); var_export($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vYXhm
function name:  (null)
number of ops:  10
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   19     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/vYXhm
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_R                                      ~2      !1, 'value'
          3        IS_NOT_IDENTICAL                                 ~3      ~2, 'N%2FA'
          4        INIT_ARRAY                                       ~4      ~3
          5        FETCH_DIM_R                                      ~5      !1, 'value'
          6        ADD_ARRAY_ELEMENT                                ~4      ~5
          7        FETCH_DIM_R                                      ~6      !0, 'value'
          8        IS_NOT_IDENTICAL                                 ~7      ~6, 'N%2FA'
          9        INIT_ARRAY                                       ~8      ~7
         10        FETCH_DIM_R                                      ~9      !0, 'value'
         11        ADD_ARRAY_ELEMENT                                ~8      ~9
         12        SPACESHIP                                        ~10     ~4, ~8
         13      > RETURN                                                   ~10
         14*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.19 ms | 999 KiB | 15 Q