3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cats = []; $cats[] = [ "name" => 'Frisky', "favorite_show" => 'Cats and Dogs' ]; $cats[] = [ "name" => 'Meowie', "favorite_show" => 'Dogs chasing Cats' ]; $cats[] = [ "name" => 'Caesar', "favorite_show" => 'All Cats Rule' ]; $cats[] = [ "name" => 'Dot', "favorite_show" => 'No cats suck' ]; usort($cats, function($a, $b) { return strcmp($a->favorite_show, $b->favorite_show); }); var_dump($cats); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oKQJO
function name:  (null)
number of ops:  18
compiled vars:  !0 = $cats
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  <array>
    5     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  <array>
    6     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  <array>
    7     7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  <array>
    9     9        INIT_FCALL                                               'usort'
         10        SEND_REF                                                 !0
         11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FoKQJO%3A9%240'
         12        SEND_VAL                                                 ~6
         13        DO_ICALL                                                 
   11    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
   13    17      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FoKQJO%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oKQJO
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        INIT_FCALL                                               'strcmp'
          3        FETCH_OBJ_R                                      ~2      !0, 'favorite_show'
          4        SEND_VAL                                                 ~2
          5        FETCH_OBJ_R                                      ~3      !1, 'favorite_show'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8      > RETURN                                                   $4
          9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FoKQJO%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.04 ms | 1396 KiB | 19 Q