I had to ask online to find the PHP 7 nightly snapshots are here https://windows.php.net/snapshots/ at the bottom under “Master”. I converted two WordPress installations to it and it’s much faster. If you’re using PHP in FastCGI mode, I’d recommend the x64 Non-Thread-Safe build.
On my server, using nginx (for now), it’s pretty easy to configure PHP per domain. I have PHP5 running as one Windows service (for our server’s Owncloud), and another PHP7 service for our WordPress sites. Here’s a guide I wrote on installing PHP as a Windows service: https://forum.nginx.org/read.php?2,236376,236376
Though our current WinSW FastCGI configuration code looks like this:
<service>
<id>PHP7</id>
<name>PHP7</name>
<description>This service handles the primary PHP7 FastCGI server.</description>
<executable>C:\server\php7\php-cgi.exe</executable>
<arguments>-b 9127 -c c:\server\php7\php.ini</arguments>
<env name="InstanceMaxRequests" value="0" />
<env name="pm.max_requests" value="0" />
<env name="PHP_FCGI_MAX_REQUESTS" value="0" />
<stopexecutable>C:\SERVER\php7\php-stop.cmd</stopexecutable>
<logpath>C:\server\logs\php7</logpath>
<log mode="roll-by-size">
<sizeThreshold>256</sizeThreshold>
<keepFiles>128</keepFiles>
</log>
</service>
And php-stop.cmd consists of just “taskkill /f /IM php-cgi.exe”
Anyways, back to the topic, looking at the WordPress code, it appears the problem is that the code used in WordPress’s widgets.php is in a foreach loop. The immediate preceding code from widgets.php:
foreach ( (array) $sidebars_widgets[$index] as $id ) {
However, your script’s code does not have a foreach loop, therefore “continue” is not correct for that location. Continue is for use in loops only. https://php.net/manual/en/control-structures.continue.php I’m pretty sure, right now, that if statement does nothing.
I think change:
if ( !isset($wp_registered_widgets[$widget_id]) ) continue;
$params = array_merge(
array(
array_merge( $sidebar,
array('widget_id' => $widget_id,
'widget_name' => $wp_registered_widgets[$widget_id]['name']) ) ),
(array) $wp_registered_widgets[$widget_id]['params']
);
to
if ( !isset($wp_registered_widgets[$widget_id]) ) {
$params = array_merge(
array(
array_merge( $sidebar,
array('widget_id' => $widget_id,
'widget_name' => $wp_registered_widgets[$widget_id]['name']) ) ),
(array) $wp_registered_widgets[$widget_id]['params']
);
}