1--TEST--
2Optimizer may rely on preloaded symbols
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.preload={PWD}/preload_optimizer.inc
7opcache.opt_debug_level=0x20000
8--EXTENSIONS--
9opcache
10--SKIPIF--
11<?php
12if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
13?>
14--FILE--
15<?php
16echo foo();
17?>
18--EXPECTF--
19$_main:
20     ; (lines=1, args=0, vars=0, tmps=%d)
21     ; (after optimizer)
22     ; $PRELOAD$:0-0
230000 RETURN null
24
25foo:
26     ; (lines=1, args=0, vars=0, tmps=%d)
27     ; (after optimizer)
28     ; %spreload_optimizer.inc:3-5
290000 RETURN int(42)
30
31$_main:
32     ; (lines=1, args=0, vars=0, tmps=%d)
33     ; (after optimizer)
34     ; %spreload_optimizer.inc:1-6
350000 RETURN int(1)
36
37$_main:
38     ; (lines=2, args=0, vars=0, tmps=%d)
39     ; (after optimizer)
40     ; %spreload_optimizer.php:1-4
410000 ECHO string("42")
420001 RETURN int(1)
4342
44