xref: /php-src/ext/com_dotnet/tests/bug73679.phpt (revision 98288a27)
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");
8if (!class_exists("dotnet")) die("skip mscoree not available");
9?>
10--FILE--
11<?php
12
13$stack = new DOTNET("mscorlib", "System.Collections.Stack", -2200000000);
14$stack->Push(".Net");
15$stack->Push("Hello ");
16echo $stack->Pop() . $stack->Pop();
17
18?>
19--EXPECTF--
20Fatal error: Uncaught com_exception: Could not create .Net object - invalid codepage! in %sbug73679.php:%d
21Stack trace:
22#0 %sbug73679.php(%d): dotnet->__construct('mscorlib', 'System.Collecti...', -2200000000)
23#1 {main}
24  thrown in %sbug73679.php on line %d
25