3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bla($a, $b) { if ($a < $b) return -1; if ($a == $b) return 0; if ($a > $b) return 1; } $data = json_decode('{ "data": [[47,47,21],[20,12,4],[6,76,91],[38,30,60],[57,98,64],[61,17,80],[83,60,13],[67,78,75],[64,12,10],[30,77,82]] }'); usort($data->data, 'bla'); echo json_encode($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KNF27
function name:  (null)
number of ops:  14
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B%0A%09++++++++%22data%22%3A+%5B%5B47%2C47%2C21%5D%2C%5B20%2C12%2C4%5D%2C%5B6%2C76%2C91%5D%2C%5B38%2C30%2C60%5D%2C%5B57%2C98%2C64%5D%2C%5B61%2C17%2C80%5D%2C%5B83%2C60%2C13%5D%2C%5B67%2C78%2C75%5D%2C%5B64%2C12%2C10%5D%2C%5B30%2C77%2C82%5D%5D%0A%09++++%7D'
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
   13     4        INIT_FCALL                                               'usort'
          5        FETCH_OBJ_W                                      $3      !0, 'data'
          6        SEND_REF                                                 $3
          7        SEND_VAL                                                 'bla'
          8        DO_ICALL                                                 
   15     9        INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        ECHO                                                     $5
         13      > RETURN                                                   1

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

End of function bla

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.74 ms | 1396 KiB | 19 Q