3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = json_decode('{ "result": true, "users": [{ "id": 11, "expected_count": 13, "user_id": 1, "event_id": 2, "user": { "id": 1, "name": "Moiz Jamali" } }, { "id": 12, "expected_count": 12, "user_id": 2, "event_id": 2, "user": { "id": 2, "name": "Juzer Samiwala" } }] }'); function cmp($a, $b) { if ($a->user->name == $b->user->name) { return 0; } return ($a->user->name < $b->user->name) ? -1 : 1; } usort($data->users, "cmp"); print_r($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DIPcv
function name:  (null)
number of ops:  13
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B+%22result%22%3A+true%2C+%22users%22%3A+%5B%7B+%22id%22%3A+11%2C+%22expected_count%22%3A+13%2C+%22user_id%22%3A+1%2C+%22event_id%22%3A+2%2C+%22user%22%3A+%7B+%22id%22%3A+1%2C+%22name%22%3A+%22Moiz+Jamali%22+%7D+%7D%2C+%7B+%22id%22%3A+12%2C+%22expected_count%22%3A+12%2C+%22user_id%22%3A+2%2C+%22event_id%22%3A+2%2C+%22user%22%3A+%7B+%22id%22%3A+2%2C+%22name%22%3A+%22Juzer+Samiwala%22+%7D+%7D%5D+%7D'
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
   15     4        INIT_FCALL                                               'usort'
          5        FETCH_OBJ_W                                      $3      !0, 'users'
          6        SEND_REF                                                 $3
          7        SEND_VAL                                                 'cmp'
          8        DO_ICALL                                                 
   17     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function cmp

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.52 ms | 1005 KiB | 16 Q