3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ [ 'id' => 1, 'expiry_date' => [ 'foo' => 'bar', 'count' => '(22)', ] ], [ 'id' => 2, 'expiry_date' => [ 'foo' => 'bar', 'count' => '(43)', ] ], [ 'id' => 3, 'expiry_date' => [ 'foo' => 'bar', 'count' => '(5)', ] ], [ 'id' => 4, 'expiry_date' => [ 'foo' => 'bar', 'count' => '(111)', ] ] ]; foreach ($array as $row) { $counts[] = (int) trim($row['expiry_date']['count'], '()'); } array_multisort($counts, $array); var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 10
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/mU0FmG
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array, !1 = $row, !2 = $counts
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   33     1      > FE_RESET_R                                           $4      !0, ->10
          2    > > FE_FETCH_R                                                   $4, !1, ->10
   34     3    >   FETCH_DIM_R                                          ~6      !1, 'expiry_date'
          4        FETCH_DIM_R                                          ~7      ~6, 'count'
          5        FRAMELESS_ICALL_2                trim                ~8      ~7, '%28%29'
          6        CAST                                              4  ~9      ~8
          7        ASSIGN_DIM                                                   !2
          8        OP_DATA                                                      ~9
   33     9      > JMP                                                          ->2
         10    >   FE_FREE                                                      $4
   36    11        INIT_FCALL                                                   'array_multisort'
         12        SEND_REF                                                     !2
         13        SEND_REF                                                     !0
         14        DO_ICALL                                                     
   37    15        INIT_FCALL                                                   'var_export'
         16        SEND_VAR                                                     !0
         17        DO_ICALL                                                     
         18      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.04 ms | 1969 KiB | 15 Q