<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/php-git.git/ext/opcache, branch php-7.2.31</title>
<subtitle>git.php.net: repository/php-src.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/'/>
<entry>
<title>Fix $x = (bool)$x; for undefined with opcache</title>
<updated>2019-11-18T08:24:03+00:00</updated>
<author>
<name>Tyson Andre</name>
<email>tysonandre775@hotmail.com</email>
</author>
<published>2019-11-15T17:47:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=a2c41c0ea6e6b6afbfaaeae25e66fd17e746a98a'/>
<id>a2c41c0ea6e6b6afbfaaeae25e66fd17e746a98a</id>
<content type='text'>
And `$x = !$x`

Noticed while working on GH-4912

The included test would not emit undefined variable errors in php 8.0
with opcache enabled. The command used:

```
php -d zend_extension=opcache.so --no-php-ini -d error_reporting=E_ALL \
    -d opcache.file_cache= -d opcache.enable_cli=1  test.php
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And `$x = !$x`

Noticed while working on GH-4912

The included test would not emit undefined variable errors in php 8.0
with opcache enabled. The command used:

```
php -d zend_extension=opcache.so --no-php-ini -d error_reporting=E_ALL \
    -d opcache.file_cache= -d opcache.enable_cli=1  test.php
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed bug #78747</title>
<updated>2019-10-25T10:47:18+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2019-10-25T10:47:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=52499938142351d20a46c2b941e957ab0d618109'/>
<id>52499938142351d20a46c2b941e957ab0d618109</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix checksum calculation for opcache</title>
<updated>2019-10-14T14:46:42+00:00</updated>
<author>
<name>Mitch Hagstrand</name>
<email>mhagstrand@gmail.com</email>
</author>
<published>2019-10-09T08:38:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=e2a6bf482faaf0a293bc2dffb530b95d9d3d6408'/>
<id>e2a6bf482faaf0a293bc2dffb530b95d9d3d6408</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix iterable return type optimization</title>
<updated>2019-09-19T15:21:00+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2019-09-19T15:20:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=003c13d7bc26aa2775041ffec955069802c86cf4'/>
<id>003c13d7bc26aa2775041ffec955069802c86cf4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix opcache return type for get_headers in zend_func_info</title>
<updated>2019-09-17T10:08:29+00:00</updated>
<author>
<name>Tyson Andre</name>
<email>tysonandre775@hotmail.com</email>
</author>
<published>2019-09-13T18:09:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=29bced9521762ed935810b54a25cb74a09e25957'/>
<id>29bced9521762ed935810b54a25cb74a09e25957</id>
<content type='text'>
https://www.php.net/manual/en/function.get-headers.php#refsect1-function.get-headers-examples
shows that it will return string keys when the second argument is
non-zero. I've verified that this is the case.

This bug was there since the initial commit in c88ffa9a567.

Closes GH-4702.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://www.php.net/manual/en/function.get-headers.php#refsect1-function.get-headers-examples
shows that it will return string keys when the second argument is
non-zero. I've verified that this is the case.

This bug was there since the initial commit in c88ffa9a567.

Closes GH-4702.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix opcache return type for hash_update_stream</title>
<updated>2019-09-03T07:23:39+00:00</updated>
<author>
<name>Tyson Andre</name>
<email>tysonandre775@hotmail.com</email>
</author>
<published>2019-09-03T01:32:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=9c3b7ccda5e3737c779e019eb1468213edaa2e39'/>
<id>9c3b7ccda5e3737c779e019eb1468213edaa2e39</id>
<content type='text'>
It can return false if the resource type is wrong.

```
php &gt; var_export(hash_update_stream(hash_init('md5'),
        imagecreate(1,1)));

Warning: hash_update_stream(): supplied resource is not a valid stream
resource in php shell code on line 1
false
```

The return types were initially added in
c88ffa9a5673cb3141660626ba1921671f0b84d6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It can return false if the resource type is wrong.

```
php &gt; var_export(hash_update_stream(hash_init('md5'),
        imagecreate(1,1)));

Warning: hash_update_stream(): supplied resource is not a valid stream
resource in php shell code on line 1
false
```

The return types were initially added in
c88ffa9a5673cb3141660626ba1921671f0b84d6
</pre>
</div>
</content>
</entry>
<entry>
<title>Also fix signature for passthru</title>
<updated>2019-08-26T09:13:26+00:00</updated>
<author>
<name>Tyson Andre</name>
<email>tysonandre775@hotmail.com</email>
</author>
<published>2019-08-25T15:02:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=1e82a2d659aac6ef95a6820d4f6ac3684e07bcad'/>
<id>1e82a2d659aac6ef95a6820d4f6ac3684e07bcad</id>
<content type='text'>
Backported from a1a8d144854acb1c891cf0c21abb0f612b1d8de7
https://www.php.net/manual/en/function.passthru.php#refsect1-function.passthru-returnvalues

`passthru()` is false with invalid args
`passthru('command')` is null.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backported from a1a8d144854acb1c891cf0c21abb0f612b1d8de7
https://www.php.net/manual/en/function.passthru.php#refsect1-function.passthru-returnvalues

`passthru()` is false with invalid args
`passthru('command')` is null.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix opcache optimizer info for time_nanosleep</title>
<updated>2019-08-26T09:13:26+00:00</updated>
<author>
<name>Tyson Andre</name>
<email>tysonandre775@hotmail.com</email>
</author>
<published>2019-08-25T14:48:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=f5bccc0eb5bfe2b1c9ba55cf1df27f2a18a046fa'/>
<id>f5bccc0eb5bfe2b1c9ba55cf1df27f2a18a046fa</id>
<content type='text'>
This can also return an array. See
https://www.php.net/manual/en/function.time-nanosleep.php#refsect1-function.time-nanosleep-returnvalues

&gt; If the delay was interrupted by a signal, an associative array will be
returned with the components:
&gt;
&gt; - seconds - number of seconds remaining in the delay
&gt; - nanoseconds - number of nanoseconds remaining in the delay

Sending a SIGUSR1 to the below program would trigger this behavior.

```
pcntl_signal(\SIGUSR1, function ($signo, $signinfo) {
    echo "Handling a signal $signo\n";
});
echo "Sleeping for 100 seconds\n";
var_export(time_nanosleep(100, 0));
```

The incomplete signature existed since c88ffa9a5.
No phpt tests existed for time_nanosleep returning an array
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This can also return an array. See
https://www.php.net/manual/en/function.time-nanosleep.php#refsect1-function.time-nanosleep-returnvalues

&gt; If the delay was interrupted by a signal, an associative array will be
returned with the components:
&gt;
&gt; - seconds - number of seconds remaining in the delay
&gt; - nanoseconds - number of nanoseconds remaining in the delay

Sending a SIGUSR1 to the below program would trigger this behavior.

```
pcntl_signal(\SIGUSR1, function ($signo, $signinfo) {
    echo "Handling a signal $signo\n";
});
echo "Sleeping for 100 seconds\n";
var_export(time_nanosleep(100, 0));
```

The incomplete signature existed since c88ffa9a5.
No phpt tests existed for time_nanosleep returning an array
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed bug #77191</title>
<updated>2019-08-13T09:19:58+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2019-08-13T09:19:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=4eeb41d1ea91fe7a44759f788ad5920eac8df0ef'/>
<id>4eeb41d1ea91fe7a44759f788ad5920eac8df0ef</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Zend signals unblocking</title>
<updated>2019-07-29T13:17:32+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2019-07-23T08:38:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=38f1288b6427fc9e2fa2b5ad9912745ded923ee7'/>
<id>38f1288b6427fc9e2fa2b5ad9912745ded923ee7</id>
<content type='text'>
There are a few parts here:
 * opcache should not be blocking signals while invoking compile_file,
   otherwise signals may remain blocked on a compile error. While at
   it, also protect SHM memory during compile_file.
 * We should deactivate Zend signals at the end of the request, to make
   sure that we gracefully recover from a missing unblock and signals
   don't remain blocked forever.
 * We don't use a critical section in deactivation, because it should
   not be necessary. Additionally we want to clean up the signal queue,
   if it is non-empty.
 * Enable SIGG(check) in debug builds so we notice issues in the future.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are a few parts here:
 * opcache should not be blocking signals while invoking compile_file,
   otherwise signals may remain blocked on a compile error. While at
   it, also protect SHM memory during compile_file.
 * We should deactivate Zend signals at the end of the request, to make
   sure that we gracefully recover from a missing unblock and signals
   don't remain blocked forever.
 * We don't use a critical section in deactivation, because it should
   not be necessary. Additionally we want to clean up the signal queue,
   if it is non-empty.
 * Enable SIGG(check) in debug builds so we notice issues in the future.
</pre>
</div>
</content>
</entry>
</feed>
