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' ) ); var_export((float) 'N/A'); echo "\n--\n"; usort($data, fn($a, $b) => (float) $b['value'] <=> (float) $a['value']); var_export($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NrVv2
function name:  (null)
number of ops:  15
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_FCALL                                               'var_export'
          2        CAST                                          5  ~2      'N%2FA'
          3        SEND_VAL                                                 ~2
          4        DO_ICALL                                                 
   19     5        ECHO                                                     '%0A--%0A'
   20     6        INIT_FCALL                                               'usort'
          7        SEND_REF                                                 !0
          8        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                                 
   21    11        INIT_FCALL                                               'var_export'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > 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/NrVv2
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_R                                      ~2      !1, 'value'
          3        CAST                                          5  ~3      ~2
          4        FETCH_DIM_R                                      ~4      !0, 'value'
          5        CAST                                          5  ~5      ~4
          6        SPACESHIP                                        ~6      ~3, ~5
          7      > RETURN                                                   ~6
          8*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.82 ms | 999 KiB | 15 Q