xref: /PHP-5.5/ext/opcache/tests/bug64353.phpt (revision a62ffb72)
1--TEST--
2Bug #64353 (Built-in classes can be unavailable with dynamic includes and OPcache)
3--INI--
4allow_url_include=1
5opcache.enable=1
6opcache.enable_cli=1
7--SKIPIF--
8<?php require_once('skipif.inc'); ?>
9--FILE--
10<?php
11class BugLoader extends php_user_filter {
12	public function filter($in, $out, &$consumed, $closing) {
13		if (!class_exists("Test")) {
14			eval("class Test extends ArrayObject {}");
15		}
16		while ($bucket = stream_bucket_make_writeable($in)) {
17			$consumed += $bucket->datalen;
18			stream_bucket_append($out, $bucket);
19		}
20		return PSFS_PASS_ON;
21	}
22}
23
24stream_filter_register('bug.test', 'BugLoader');
25include "php://filter/read=bug.test/resource=data://text/plain,<?php\n";
26echo "OK\n";
27?>
28--EXPECT--
29OK
30