php – add_action taking an array with the 2nd argument?

I was going through some source code of Astra theme and found these lines in theme/astra/inc/class-astra-loop.php:

class Astra_Loop {

    public function __construct() {

        add_action( 'astra_content_loop', array( $this, 'loop_markup' ) );


Shouldn’t the 2nd argument be a function? Apparently here the 2nd argument is an array. I checked it with json_encode(array( $this, 'loop_markup' )), it outputs ({},"loop_markup"). So how is this working?