How to make sure that Apache uses PHP 7.3 for MAC

I'm trying to run Xdebug (which I've installed with pecl) for php but getting the following error.

php -v
Xdebug requires the 320160303 version of the Zend Engine API.
The version 320180731 of the Zend Engine API installed is the most recent.
Contact Derick Rethans at for a later version of Xdebug.

PHP 7.3.3 (cli) (build: 8 Mar 2019 16:40:07) (NTS)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.3, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.3, Copyright (c) 1999-2018, by Zend Technologies

I've installed the latest version of php with Homebrew 7.3 but
Apache uses PHP version 7.1.23 .
I think I have a problem because I'm using a bad version of the Zend API.

php config in httpd.conf is

LoadModule php7_module libexec / apache2 /

phpize gives the following.

/ usr / local / bin / phpize -v
Configuration for:
PHP version Api: 20180731
Zend Module Api Number: 20180731
Zend Extension Api Number: 320180731

I've added the following to php.ini

zend_extension = / usr / lib / php / extensions / no-debug-no-zts-20160303 /

Which exists here:

/ usr / lib / php / extensions / no-debug-no-zts-20160303 ls

My questions