summaryrefslogtreecommitdiff
path: root/Zend/tests/bug70164.phpt
blob: 7777be4ee0856689804b6fb0b6d2a48cf568125c (plain)
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
--TEST--
__COMPILER_HALT_OFFSET__ is a "magic" constant, which should work if referenced directly, even in a namespace
--FILE--
<?php

namespace {
	echo __COMPILER_HALT_OFFSET__, "\n";
	echo \__COMPILER_HALT_OFFSET__, "\n";
}

namespace Foo {
	echo __COMPILER_HALT_OFFSET__, "\n";
	echo \__COMPILER_HALT_OFFSET__, "\n";
	echo namespace\__COMPILER_HALT_OFFSET__, "\n";

}

__halt_compiler();

?>
--EXPECTF--
%d
%d
%d
%d

Fatal error: Uncaught Error: Undefined constant 'Foo\__COMPILER_HALT_OFFSET__' in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d