Use %e instead of a hardcoded forward slash.
var_dump(foo());
?>
--EXPECTF--
-<!-- init '%s/observer_backtrace_%d.php' -->
+<!-- init '%s%eobserver_backtrace_%d.php' -->
<!--
- {main} %s/observer_backtrace_%d.php
+ {main} %s%eobserver_backtrace_%d.php
-->
-<file '%s/observer_backtrace_%d.php'>
+<file '%s%eobserver_backtrace_%d.php'>
<!-- init foo() -->
<!--
foo()
- {main} %s/observer_backtrace_%d.php
+ {main} %s%eobserver_backtrace_%d.php
-->
<foo>
<!-- init gen() -->
gen()
Generator::current()
foo()
- {main} %s/observer_backtrace_%d.php
+ {main} %s%eobserver_backtrace_%d.php
-->
<gen>
<!-- init TestClass::foo() -->
gen()
Generator::current()
foo()
- {main} %s/observer_backtrace_%d.php
+ {main} %s%eobserver_backtrace_%d.php
-->
<TestClass::foo>
<!-- init TestClass::{closure}() -->
gen()
Generator::current()
foo()
- {main} %s/observer_backtrace_%d.php
+ {main} %s%eobserver_backtrace_%d.php
-->
<TestClass::{closure}>
<!-- init TestClass::bar() -->
gen()
Generator::current()
foo()
- {main} %s/observer_backtrace_%d.php
+ {main} %s%eobserver_backtrace_%d.php
-->
<TestClass::bar>
</TestClass::bar>
[1]=>
int(1337)
}
-</file '%s/observer_backtrace_%d.php'>
+</file '%s%eobserver_backtrace_%d.php'>
echo 'DONE' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_basic_01.php' -->
-<file '%s/observer_basic_01.php'>
+<!-- init '%s%eobserver_basic_01.php' -->
+<file '%s%eobserver_basic_01.php'>
<!-- init foo() -->
<foo>
Foo
</bar>
</foo>
DONE
-</file '%s/observer_basic_01.php'>
+</file '%s%eobserver_basic_01.php'>
echo 'DONE' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_basic_02.php' -->
-<file '%s/observer_basic_02.php'>
+<!-- init '%s%eobserver_basic_02.php' -->
+<file '%s%eobserver_basic_02.php'>
<!-- init TestClass::foo() -->
<TestClass::foo>
Foo
</TestClass::bar>
</TestClass::foo>
DONE
-</file '%s/observer_basic_02.php'>
+</file '%s%eobserver_basic_02.php'>
foo();
?>
--EXPECTF--
-<!-- init '%s/observer_basic_03.php' -->
-<file '%s/observer_basic_03.php'>
+<!-- init '%s%eobserver_basic_03.php' -->
+<file '%s%eobserver_basic_03.php'>
<!-- init foo() -->
<foo>
Foo
</foo>
- <!-- init '%s/observer.inc' -->
- <file '%s/observer.inc'>
+ <!-- init '%s%eobserver.inc' -->
+ <file '%s%eobserver.inc'>
<!-- init foo_observer_test() -->
<foo_observer_test>
foo_observer_test
</foo_observer_test>
- </file '%s/observer.inc'>
+ </file '%s%eobserver.inc'>
<foo>
Foo
</foo>
-</file '%s/observer_basic_03.php'>
+</file '%s%eobserver_basic_03.php'>
foo();
?>
--EXPECTF--
-<!-- init '%s/observer_basic_04.php' -->
-<file '%s/observer_basic_04.php'>
+<!-- init '%s%eobserver_basic_04.php' -->
+<file '%s%eobserver_basic_04.php'>
<!-- init foo() -->
Foo
- <!-- init '%s/observer.inc' -->
- <file '%s/observer.inc'>
+ <!-- init '%s%eobserver.inc' -->
+ <file '%s%eobserver.inc'>
<!-- init foo_observer_test() -->
foo_observer_test
- </file '%s/observer.inc'>
+ </file '%s%eobserver.inc'>
Foo
-</file '%s/observer_basic_04.php'>
+</file '%s%eobserver_basic_04.php'>
foo();
?>
--EXPECTF--
-<!-- init '%s/observer_basic_05.php' -->
+<!-- init '%s%eobserver_basic_05.php' -->
<!-- init foo() -->
<foo>
Foo
</foo>
-<!-- init '%s/observer.inc' -->
+<!-- init '%s%eobserver.inc' -->
<!-- init foo_observer_test() -->
<foo_observer_test>
foo_observer_test
}
?>
--EXPECTF--
-<!-- init '%s/observer_call_user_func_%d.php' -->
-<file '%s/observer_call_user_func_%d.php'>
+<!-- init '%s%eobserver_call_user_func_%d.php' -->
+<file '%s%eobserver_call_user_func_%d.php'>
<!-- init Test\MyClass::myMethod() -->
<Test\MyClass::myMethod>
MyClass::myMethod called
<Test\my_function>
my_function called
</Test\my_function>
-</file '%s/observer_call_user_func_%d.php'>
+</file '%s%eobserver_call_user_func_%d.php'>
}
?>
--EXPECTF--
-<!-- init '%s/observer_call_user_func_%d.php' -->
-<file '%s/observer_call_user_func_%d.php'>
+<!-- init '%s%eobserver_call_user_func_%d.php' -->
+<file '%s%eobserver_call_user_func_%d.php'>
<!-- init Test\MyClass::myMethod() -->
<Test\MyClass::myMethod>
MyClass::myMethod called
<Test\my_function>
my_function called
</Test\my_function>
-</file '%s/observer_call_user_func_%d.php'>
+</file '%s%eobserver_call_user_func_%d.php'>
}
?>
--EXPECTF--
-<!-- init '%s/observer_call_user_func_%d.php' -->
-<file '%s/observer_call_user_func_%d.php'>
+<!-- init '%s%eobserver_call_user_func_%d.php' -->
+<file '%s%eobserver_call_user_func_%d.php'>
<!-- init Test\MyClass::myMethod() -->
<Test\MyClass::myMethod>
MyClass::myMethod called
<Test\my_function>
my_function called
</Test\my_function>
-</file '%s/observer_call_user_func_%d.php'>
+</file '%s%eobserver_call_user_func_%d.php'>
}
?>
--EXPECTF--
-<!-- init '%s/observer_call_user_func_%d.php' -->
-<file '%s/observer_call_user_func_%d.php'>
+<!-- init '%s%eobserver_call_user_func_%d.php' -->
+<file '%s%eobserver_call_user_func_%d.php'>
<!-- init Test\MyClass::myMethod() -->
<Test\MyClass::myMethod>
MyClass::myMethod called
<Test\my_function>
my_function called
</Test\my_function>
-</file '%s/observer_call_user_func_%d.php'>
+</file '%s%eobserver_call_user_func_%d.php'>
echo 'DONE' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_closure_%d.php' -->
-<file '%s/observer_closure_%d.php'>
+<!-- init '%s%eobserver_closure_%d.php' -->
+<file '%s%eobserver_closure_%d.php'>
<!-- init {closure}() -->
<{closure}>
Answer
</{closure}>
</{closure}>
DONE
-</file '%s/observer_closure_%d.php'>
+</file '%s%eobserver_closure_%d.php'>
echo 'You should not see this.';
?>
--EXPECTF--
-<!-- init '%s/observer_error_%d.php' -->
-<file '%s/observer_error_%d.php'>
+<!-- init '%s%eobserver_error_%d.php' -->
+<file '%s%eobserver_error_%d.php'>
<!-- init foo() -->
<foo>
Fatal error: Allowed memory size of 2097152 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
</foo:NULL>
-</file '%s/observer_error_%d.php'>
+</file '%s%eobserver_error_%d.php'>
echo 'You should not see this.';
?>
--EXPECTF--
-<!-- init '%s/observer_error_%d.php' -->
-<file '%s/observer_error_%d.php'>
+<!-- init '%s%eobserver_error_%d.php' -->
+<file '%s%eobserver_error_%d.php'>
<!-- init foo() -->
<foo>
Fatal error: Foo error in %s on line %d
</foo:NULL>
-</file '%s/observer_error_%d.php'>
+</file '%s%eobserver_error_%d.php'>
echo 'Done.' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_error_%d.php' -->
-<file '%s/observer_error_%d.php'>
+<!-- init '%s%eobserver_error_%d.php' -->
+<file '%s%eobserver_error_%d.php'>
<!-- init main() -->
<main>
<!-- init foo() -->
After error.
</main:NULL>
Done.
-</file '%s/observer_error_%d.php'>
+</file '%s%eobserver_error_%d.php'>
echo 'Done.' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_error_%d.php' -->
-<file '%s/observer_error_%d.php'>
+<!-- init '%s%eobserver_error_%d.php' -->
+<file '%s%eobserver_error_%d.php'>
<!-- init main() -->
<main>
<!-- init foo() -->
SOAP-ERROR: Parsing WSDL: Couldn't load from 'foo' : failed to load external entity "foo"
Done.
-</file '%s/observer_error_%d.php'>
+</file '%s%eobserver_error_%d.php'>
echo 'DONE' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_eval_%d.php' -->
-<file '%s/observer_eval_%d.php'>
- <!-- init '%s/observer_eval_%d.php(%d) : eval()'d code' -->
- <file '%s/observer_eval_%d.php(%d) : eval()'d code'>
- </file '%s/observer_eval_%d.php(%d) : eval()'d code'>
+<!-- init '%s%eobserver_eval_%d.php' -->
+<file '%s%eobserver_eval_%d.php'>
+ <!-- init '%s%eobserver_eval_%d.php(%d) : eval()'d code' -->
+ <file '%s%eobserver_eval_%d.php(%d) : eval()'d code'>
+ </file '%s%eobserver_eval_%d.php(%d) : eval()'d code'>
Foo eval
DONE
-</file '%s/observer_eval_%d.php'>
+</file '%s%eobserver_eval_%d.php'>
echo 'You should not see this' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_exception_%d.php' -->
-<file '%s/observer_exception_%d.php'>
+<!-- init '%s%eobserver_exception_%d.php' -->
+<file '%s%eobserver_exception_%d.php'>
<!-- init foo() -->
<foo>
Call #0
<!-- Exception: RuntimeException -->
</foo>
<!-- Exception: RuntimeException -->
-</file '%s/observer_exception_%d.php'>
+</file '%s%eobserver_exception_%d.php'>
-Fatal error: Uncaught RuntimeException: Third time is a charm in %s/observer_exception_%d.php:%d
+Fatal error: Uncaught RuntimeException: Third time is a charm in %s%eobserver_exception_%d.php:%d
Stack trace:
-#0 %s/observer_exception_%d.php(%d): foo()
+#0 %s%eobserver_exception_%d.php(%d): foo()
#1 {main}
- thrown in %s/observer_exception_%d.php on line %d
+ thrown in %s%eobserver_exception_%d.php on line %d
echo doSomething() . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_generator_%d.php' -->
-<file '%s/observer_generator_%d.php'>
+<!-- init '%s%eobserver_generator_%d.php' -->
+<file '%s%eobserver_generator_%d.php'>
<!-- init doSomething() -->
<doSomething>
<!-- init getResults() -->
</getResults:NULL>
</doSomething:'Done'>
Done
-</file '%s/observer_generator_%d.php'>
+</file '%s%eobserver_generator_%d.php'>
echo doSomething() . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_generator_%d.php' -->
-<file '%s/observer_generator_%d.php'>
+<!-- init '%s%eobserver_generator_%d.php' -->
+<file '%s%eobserver_generator_%d.php'>
<!-- init doSomething() -->
<doSomething>
<!-- init getResults() -->
1337
</doSomething:'Done'>
Done
-</file '%s/observer_generator_%d.php'>
+</file '%s%eobserver_generator_%d.php'>
echo doSomething() . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_generator_%d.php' -->
-<file '%s/observer_generator_%d.php'>
+<!-- init '%s%eobserver_generator_%d.php' -->
+<file '%s%eobserver_generator_%d.php'>
<!-- init doSomething() -->
<doSomething>
<!-- init fooResults() -->
</fooResults:NULL>
</doSomething:'Done'>
Done
-</file '%s/observer_generator_%d.php'>
+</file '%s%eobserver_generator_%d.php'>
echo doSomething() . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_generator_%d.php' -->
-<file '%s/observer_generator_%d.php'>
+<!-- init '%s%eobserver_generator_%d.php' -->
+<file '%s%eobserver_generator_%d.php'>
<!-- init doSomething() -->
<doSomething>
<!-- init fooResults() -->
</fooResults:NULL>
</doSomething:'Done'>
Done
-</file '%s/observer_generator_%d.php'>
+</file '%s%eobserver_generator_%d.php'>
echo doSomething() . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_generator_%d.php' -->
-<file '%s/observer_generator_%d.php'>
+<!-- init '%s%eobserver_generator_%d.php' -->
+<file '%s%eobserver_generator_%d.php'>
<!-- init doSomething() -->
<doSomething>
<!-- init fooResults() -->
<!-- Exception: RuntimeException -->
</doSomething:NULL>
<!-- Exception: RuntimeException -->
-</file '%s/observer_generator_%d.php'>
+</file '%s%eobserver_generator_%d.php'>
-Fatal error: Uncaught RuntimeException: Oops! in %s/observer_generator_%d.php:%d
+Fatal error: Uncaught RuntimeException: Oops! in %s%eobserver_generator_%d.php:%d
Stack trace:
-#0 %s/observer_generator_%d.php(%d): fooResults()
-#1 %s/observer_generator_%d.php(%d): doSomething()
+#0 %s%eobserver_generator_%d.php(%d): fooResults()
+#1 %s%eobserver_generator_%d.php(%d): doSomething()
#2 {main}
- thrown in %s/observer_generator_%d.php on line %d
+ thrown in %s%eobserver_generator_%d.php on line %d
echo 'DONE' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_magic_01.php' -->
-<file '%s/observer_magic_01.php'>
+<!-- init '%s%eobserver_magic_01.php' -->
+<file '%s%eobserver_magic_01.php'>
<!-- init MagicTest::foo() -->
<MagicTest::foo>
test
</MagicTest::foo>
</MagicTest::__call>
DONE
-</file '%s/observer_magic_01.php'>
+</file '%s%eobserver_magic_01.php'>
foo();
?>
--EXPECTF--
-<!-- init '%s/observer_opline_%d.php' -->
+<!-- init '%s%eobserver_opline_%d.php' -->
<!-- opcode: 'ZEND_INIT_FCALL' -->
-<file '%s/observer_opline_%d.php'>
+<file '%s%eobserver_opline_%d.php'>
<!-- opcode: 'ZEND_INIT_FCALL' -->
<!-- init foo() -->
<!-- opcode: 'ZEND_ECHO' -->
Foo
<!-- opcode: 'ZEND_RETURN' -->
</foo>
- <!-- init '%s/observer.inc' -->
+ <!-- init '%s%eobserver.inc' -->
<!-- opcode: 'ZEND_INIT_FCALL' -->
- <file '%s/observer.inc'>
+ <file '%s%eobserver.inc'>
<!-- opcode: 'ZEND_INIT_FCALL' -->
<!-- init foo_observer_test() -->
<!-- opcode: 'ZEND_ECHO' -->
<!-- opcode: 'ZEND_RETURN' -->
</foo_observer_test>
<!-- opcode: 'ZEND_RETURN' -->
- </file '%s/observer.inc'>
+ </file '%s%eobserver.inc'>
6
<foo>
<!-- opcode: 'ZEND_ECHO' -->
<!-- opcode: 'ZEND_RETURN' -->
</foo>
<!-- opcode: 'ZEND_RETURN' -->
-</file '%s/observer_opline_%d.php'>
+</file '%s%eobserver_opline_%d.php'>
echo 'Done' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_retval_%d.php' -->
-<file '%s/observer_retval_%d.php'>
+<!-- init '%s%eobserver_retval_%d.php' -->
+<file '%s%eobserver_retval_%d.php'>
<!-- init foo() -->
<foo>
</foo:'I should be observable'>
<foo>
</foo:'I should be observable'>
Done
-</file '%s/observer_retval_%d.php'>
+</file '%s%eobserver_retval_%d.php'>
echo 'Done' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_retval_%d.php' -->
-<file '%s/observer_retval_%d.php'>
+<!-- init '%s%eobserver_retval_%d.php' -->
+<file '%s%eobserver_retval_%d.php'>
<!-- init foo() -->
<foo>
</foo:'I should be observable'>
<foo>
</foo:'Me too!'>
Done
-</file '%s/observer_retval_%d.php'>
+</file '%s%eobserver_retval_%d.php'>
echo 'Done' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_retval_%d.php' -->
-<file '%s/observer_retval_%d.php'>
+<!-- init '%s%eobserver_retval_%d.php' -->
+<file '%s%eobserver_retval_%d.php'>
<!-- init foo() -->
<foo>
</foo:object(MyRetval)#%d>
<foo>
</foo:object(MyRetval)#%d>
Done
-</file '%s/observer_retval_%d.php'>
+</file '%s%eobserver_retval_%d.php'>
echo 'Done' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_retval_%d.php' -->
-<file '%s/observer_retval_%d.php'>
+<!-- init '%s%eobserver_retval_%d.php' -->
+<file '%s%eobserver_retval_%d.php'>
<!-- init foo() -->
<foo>
<!-- init getObj() -->
<bar>
</bar:'This gets freed in the return handler when unused'>
Done
-</file '%s/observer_retval_%d.php'>
+</file '%s%eobserver_retval_%d.php'>
echo 'Done' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_retval_%d.php' -->
-<file '%s/observer_retval_%d.php'>
+<!-- init '%s%eobserver_retval_%d.php' -->
+<file '%s%eobserver_retval_%d.php'>
<!-- init foo() -->
<foo>
Warning: Undefined variable $i_do_not_exist in %s on line %d
</foo:NULL>
Done
-</file '%s/observer_retval_%d.php'>
+</file '%s%eobserver_retval_%d.php'>
echo 'Done' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_retval_%d.php' -->
-<file '%s/observer_retval_%d.php'>
+<!-- init '%s%eobserver_retval_%d.php' -->
+<file '%s%eobserver_retval_%d.php'>
<!-- init foo() -->
<foo>
</foo:'I should be observable'>
<foo>
</foo:'I should be observable'>
Done
-</file '%s/observer_retval_%d.php'>
+</file '%s%eobserver_retval_%d.php'>
echo 'Done' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_retval_%d.php' -->
-<file '%s/observer_retval_%d.php'>
+<!-- init '%s%eobserver_retval_%d.php' -->
+<file '%s%eobserver_retval_%d.php'>
<!-- init foo() -->
<foo>
<!-- init getMessage() -->
</getMessage:'I should be observable'>
</foo:'I should be observable'>
Done
-</file '%s/observer_retval_%d.php'>
+</file '%s%eobserver_retval_%d.php'>
echo 'Done' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_retval_by_ref_%d.php' -->
-<file '%s/observer_retval_by_ref_%d.php'>
+<!-- init '%s%eobserver_retval_by_ref_%d.php' -->
+<file '%s%eobserver_retval_by_ref_%d.php'>
<!-- init foo() -->
<foo>
</foo:'I should be observable'>
<foo>
</foo:'I should be observable'>
Done
-</file '%s/observer_retval_by_ref_%d.php'>
+</file '%s%eobserver_retval_by_ref_%d.php'>
echo 'Done' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_retval_by_ref_%d.php' -->
-<file '%s/observer_retval_by_ref_%d.php'>
+<!-- init '%s%eobserver_retval_by_ref_%d.php' -->
+<file '%s%eobserver_retval_by_ref_%d.php'>
<!-- init foo() -->
<foo>
Notice: Only variable references should be returned by reference in %s on line %d
</foo:'I should be observable'>
Done
-</file '%s/observer_retval_by_ref_%d.php'>
+</file '%s%eobserver_retval_by_ref_%d.php'>
echo 'Done' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_retval_by_ref_%d.php' -->
-<file '%s/observer_retval_by_ref_%d.php'>
+<!-- init '%s%eobserver_retval_by_ref_%d.php' -->
+<file '%s%eobserver_retval_by_ref_%d.php'>
<!-- init foo() -->
<foo>
<!-- init getMessage() -->
Notice: Only variable references should be returned by reference in %s on line %d
</foo:'I should be observable'>
Done
-</file '%s/observer_retval_by_ref_%d.php'>
+</file '%s%eobserver_retval_by_ref_%d.php'>
echo 'Done: ' . bar(40) . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_shutdown_%d.php' -->
-<file '%s/observer_shutdown_%d.php'>
+<!-- init '%s%eobserver_shutdown_%d.php' -->
+<file '%s%eobserver_shutdown_%d.php'>
<!-- init bar() -->
<bar>
</bar:40>
Done: 40
-</file '%s/observer_shutdown_%d.php'>
+</file '%s%eobserver_shutdown_%d.php'>
<!-- init {closure}() -->
<{closure}>
<!-- init foo() -->
echo 'Done: ' . bar(40) . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_shutdown_%d.php' -->
-<file '%s/observer_shutdown_%d.php'>
+<!-- init '%s%eobserver_shutdown_%d.php' -->
+<file '%s%eobserver_shutdown_%d.php'>
<!-- init bar() -->
<bar>
</bar:40>
Done: 40
-</file '%s/observer_shutdown_%d.php'>
+</file '%s%eobserver_shutdown_%d.php'>
<!-- init MyClass::__destruct() -->
<MyClass::__destruct>
<!-- init foo() -->
foo(42);
?>
--EXPECTF--
-<!-- init '%s/observer_types_%d.php' -->
-<file '%s/observer_types_%d.php'>
+<!-- init '%s%eobserver_types_%d.php' -->
+<file '%s%eobserver_types_%d.php'>
<!-- init foo() -->
<foo>
<!-- Exception: TypeError -->
</foo:NULL>
<!-- Exception: TypeError -->
-</file '%s/observer_types_%d.php'>
+</file '%s%eobserver_types_%d.php'>
Fatal error: Uncaught TypeError: foo(): Argument #1 ($a) must be of type array, int given, called in %s:%d
Stack trace:
-#0 %s/observer_types_%d.php(%d): foo(42)
+#0 %s%eobserver_types_%d.php(%d): foo(42)
#1 {main}
- thrown in %s/observer_types_%d.php on line %d
+ thrown in %s%eobserver_types_%d.php on line %d
echo 'Done' . PHP_EOL;
?>
--EXPECTF--
-<!-- init '%s/observer_zend_call_function_%d.php' -->
-<file '%s/observer_zend_call_function_%d.php'>
+<!-- init '%s%eobserver_zend_call_function_%d.php' -->
+<file '%s%eobserver_zend_call_function_%d.php'>
<!-- init sum() -->
<sum>
</sum>
</sum>
int(15)
Done
-</file '%s/observer_zend_call_function_%d.php'>
+</file '%s%eobserver_zend_call_function_%d.php'>