3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a1 = array('55','something1','something2','something3' ); $a2 = array('77','something14','something25','something36' ); $a4 = array('66.6','something15','something25','something34' ); $array = [$a1, $a2, $a4]; usort($array, function($a, $b) { if ($a[0] > $b[0]) { return 1; } else { return -1; } }); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QnUXc
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a1, !1 = $a2, !2 = $a4, !3 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, <array>
    9     3        INIT_ARRAY                                       ~7      !0
          4        ADD_ARRAY_ELEMENT                                ~7      !1
          5        ADD_ARRAY_ELEMENT                                ~7      !2
          6        ASSIGN                                                   !3, ~7
   11     7        INIT_FCALL                                               'usort'
          8        SEND_REF                                                 !3
          9        DECLARE_LAMBDA_FUNCTION                          ~9      [0]
   17    10        SEND_VAL                                                 ~9
   11    11        DO_ICALL                                                 
   20    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !3
         14        DO_ICALL                                                 
         15      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QnUXc
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        FETCH_DIM_R                                      ~2      !0, 0
          3        FETCH_DIM_R                                      ~3      !1, 0
          4        IS_SMALLER                                               ~3, ~2
          5      > JMPZ                                                     ~4, ->8
   13     6    > > RETURN                                                   1
   12     7*       JMP                                                      ->9
   15     8    > > RETURN                                                   -1
   17     9*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139 ms | 1000 KiB | 15 Q