3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Results = array( "Matchings" => array( array("Quotient"=>0.5) ) ); echo "<pre>".print_r($Results, true)."</pre>"; $Results["Matchings"] = uasort($Results["Matchings"], "sort_cmp"); die("<pre>".print_r($Results, true)."</pre>"); function sort_cmp($a, $b){ echo "<pre>".print_r(array($a, $b), true)."</pre>"; if($a["Quotient"] == $b["Quotient"]) { return 0; } return ($a["Quotient"] > $b["Quotient"] ? 1 : -1); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/9Cuh4
function name:  (null)
number of ops:  23
compiled vars:  !0 = $Results
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $2      
          5        CONCAT                                           ~3      '%3Cpre%3E', $2
          6        CONCAT                                           ~4      ~3, '%3C%2Fpre%3E'
          7        ECHO                                                     ~4
   10     8        INIT_FCALL                                               'uasort'
          9        FETCH_DIM_W                                      $6      !0, 'Matchings'
         10        SEND_REF                                                 $6
         11        SEND_VAL                                                 'sort_cmp'
         12        DO_ICALL                                         $7      
         13        ASSIGN_DIM                                               !0, 'Matchings'
         14        OP_DATA                                                  $7
   12    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $8      
         19        CONCAT                                           ~9      '%3Cpre%3E', $8
         20        CONCAT                                           ~10     ~9, '%3C%2Fpre%3E'
         21      > EXIT                                                     ~10
   24    22*     > RETURN                                                   1

Function sort_cmp:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Cuh4
function name:  sort_cmp
number of ops:  25
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   16     2        INIT_FCALL                                               'print_r'
          3        INIT_ARRAY                                       ~2      !0
          4        ADD_ARRAY_ELEMENT                                ~2      !1
          5        SEND_VAL                                                 ~2
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $3      
          8        CONCAT                                           ~4      '%3Cpre%3E', $3
          9        CONCAT                                           ~5      ~4, '%3C%2Fpre%3E'
         10        ECHO                                                     ~5
   18    11        FETCH_DIM_R                                      ~6      !0, 'Quotient'
         12        FETCH_DIM_R                                      ~7      !1, 'Quotient'
         13        IS_EQUAL                                                 ~6, ~7
         14      > JMPZ                                                     ~8, ->16
   20    15    > > RETURN                                                   0
   23    16    >   FETCH_DIM_R                                      ~9      !0, 'Quotient'
         17        FETCH_DIM_R                                      ~10     !1, 'Quotient'
         18        IS_SMALLER                                               ~10, ~9
         19      > JMPZ                                                     ~11, ->22
         20    >   QM_ASSIGN                                        ~12     1
         21      > JMP                                                      ->23
         22    >   QM_ASSIGN                                        ~12     -1
         23    > > RETURN                                                   ~12
   24    24*     > RETURN                                                   null

End of function sort_cmp

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.8 ms | 1400 KiB | 17 Q