xref: /PHP-8.1/ext/com_dotnet/tests/bug73679.phpt (revision 56f90492)
1--TEST--
2Bug #73679 DOTNET read access violation using invalid codepage
3--EXTENSIONS--
4com_dotnet
5--SKIPIF--
6<?php
7if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only");
8?>
9--FILE--
10<?php
11
12$stack = new DOTNET("mscorlib", "System.Collections.Stack", -2200000000);
13$stack->Push(".Net");
14$stack->Push("Hello ");
15echo $stack->Pop() . $stack->Pop();
16
17?>
18--EXPECTF--
19Fatal error: Uncaught com_exception: Could not create .Net object - invalid codepage! in %sbug73679.php:%d
20Stack trace:
21#0 %sbug73679.php(%d): dotnet->__construct('mscorlib', 'System.Collecti...', -2200000000)
22#1 {main}
23  thrown in %sbug73679.php on line %d
24