3v4l.org

run code in 300+ 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 = 13
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/mU0FmG
function name:  (null)
number of ops:  22
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, ->13
          2    > > FE_FETCH_R                                               $4, !1, ->13
   34     3    >   INIT_FCALL                                               'trim'
          4        FETCH_DIM_R                                      ~6      !1, 'expiry_date'
          5        FETCH_DIM_R                                      ~7      ~6, 'count'
          6        SEND_VAL                                                 ~7
          7        SEND_VAL                                                 '%28%29'
          8        DO_ICALL                                         $8      
          9        CAST                                          4  ~9      $8
         10        ASSIGN_DIM                                               !2
         11        OP_DATA                                                  ~9
   33    12      > JMP                                                      ->2
         13    >   FE_FREE                                                  $4
   36    14        INIT_FCALL                                               'array_multisort'
         15        SEND_REF                                                 !2
         16        SEND_REF                                                 !0
         17        DO_ICALL                                                 
   37    18        INIT_FCALL                                               'var_export'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.17 ms | 1017 KiB | 16 Q