File: bug01790.phpt

package info (click to toggle)
xdebug 3.4.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,096 kB
  • sloc: ansic: 19,944; php: 6,217; xml: 4,172; pascal: 534; makefile: 4; sh: 2
file content (47 lines) | stat: -rw-r--r-- 879 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--TEST--
Test for bug #1790: Segfault in var_dump() or while debugging with protobuf extension
--SKIPIF--
<?php
require __DIR__ . '/../utils.inc';
check_reqs('ext protobuf');
?>
--INI--
xdebug.mode=develop
--FILE--
<?php
ini_set('html_errors', 0);
ini_set('xdebug.cli_color', 0);
var_dump(new \Google\Protobuf\Timestamp());

echo "\n--\n\n";

ini_set('html_errors', 1);
ini_set('xdebug.cli_color', 0);
var_dump(new \Google\Protobuf\Timestamp());

echo "\n\n--\n\n";

ini_set('html_errors', 0);
ini_set('xdebug.cli_color', 1);
var_dump(new \Google\Protobuf\Timestamp());
?>
--EXPECTF--
%sbug01790.php:%d:
class Google\Protobuf\Timestamp#%d (0) {
  ...
}

--

<pre class='xdebug-var-dump' dir='ltr'>
<small>%sbug01790.php:%d:</small>
<b>object</b>(<i>Google\Protobuf\Timestamp</i>)[<i>%d</i>]
  ...
</pre>

--

%sbug01790.php:%d:
class Google\Protobuf\Timestamp#%d (0) {
  ...
}%A