This is how I got UI to work on my 64-bit Windows 10 local computer:
Step 1: I went to https://pecl.php.net/package/ui and selected the v2.0.0 DLL for Windows
Step 2: I downloaded the version 2.0.0 zipfile for TS and x64
Step 3: I created a folder for the extracted files at C:\php_ext
Step 4: I had DLL-location-related issues with my current version 8.3.11. So I downloaded PHP 7.1.7 from https://windows.php.net/downloads/releases/archives/.
Step 5: I extracted the contents from the zipfile and installed in a separate folder called C:\php7.1.7
Step 6: Inside Windows=>Control Panel=>System=>Advanced system settings=>Environment Variables, I added C:\php7.1.7 and C:\php_ext into the Administrator Path environment variable
Step 7: I also added C:\php7.1.7 and C:\php_ext into the System variables Path environment variable
Step 8: I copied C:\php7.1.7\php.ini-production to C:\php7.1.7\php.ini
Step 9: In C:\php7.1.7\php.ini I added the entry: extension_dir = "C:\php_ext"
Step 10. In C:\php7.1.7\php.ini I added the entry: extension=php_ui.dll
Step 11. I ran php --ri ui. It outputted: ui support => enabled
Step 12: I ran "php C:\php_ext\gallery.php" and the gallery Windows GUI app worked fine!