3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cmp($a, $b) { $v = floatval($a) - floatval($b); return ($v == 0) ? 0 : (($v < 0) ? -1 : 1); } $tab = array('123:janek', '233:franek', '23:zenek', '33:pawel'); uasort($tab, 'cmp'); print_r($tab);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/95GmC
function name:  (null)
number of ops:  9
compiled vars:  !0 = $tab
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'uasort'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'cmp'
          4        DO_ICALL                                                 
    8     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function cmp:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/95GmC
function name:  cmp
number of ops:  18
compiled vars:  !0 = $a, !1 = $b, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        CAST                                          5  ~3      !0
          3        CAST                                          5  ~4      !1
          4        SUB                                              ~5      ~3, ~4
          5        ASSIGN                                                   !2, ~5
    4     6        IS_EQUAL                                                 !2, 0
          7      > JMPZ                                                     ~7, ->10
          8    >   QM_ASSIGN                                        ~8      0
          9      > JMP                                                      ->16
         10    >   IS_SMALLER                                               !2, 0
         11      > JMPZ                                                     ~9, ->14
         12    >   QM_ASSIGN                                        ~10     -1
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~10     1
         15    >   QM_ASSIGN                                        ~8      ~10
         16    > > RETURN                                                   ~8
    5    17*     > RETURN                                                   null

End of function cmp

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.55 ms | 1401 KiB | 17 Q