<?php
use B\D, C\E as F;
namespace A ;
use B\D, C\E as F;
// function calls
function foo() { echo __NAMESPACE__;}
namespace C;
use B\D, C\E as F;
declare(ticks=1);
function tick_handler()
{
echo "tick_handler() called\n";
}
class E
{
function foo() { echo __NAMESPACE__;}}
//* namespace{ use B\D, C\E as F;
// function calls*tick_handler()/
new E();
tick_handler();
\C\E::foo(); // then calls global function "foo"
new D(); // using import rules, creates object of class "D" defined in namespace "B"
// if not found, it tries to autoload class "B\D"
new F(); // using import rules, creates object of class "E" defined in namespace "C"
// if not found, it tries to autoload class "C\E"
new \B(); // creates object of class "B" defined in global scope
// if not found, it tries to autoload class "B"
new \D(); // creates object of class "D" defined in global scope
// if not found, it tries to autoload class "D"
new \F(); // creates object of class "F" defined in global scope
// if no
?>
Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in /in/MKJTh on line 3
Process exited with code 255.
tick_handler() called
Deprecated: Non-static method C\E::foo() should not be called statically in /in/MKJTh on line 28
C
Fatal error: Uncaught Error: Class 'B\D' not found in /in/MKJTh:30
Stack trace:
#0 {main}
thrown in /in/MKJTh on line 30
Process exited with code 255.
Output for 7.3.32 - 7.3.33
tick_handler() called
C
Fatal error: Uncaught Error: Class 'B\D' not found in /in/MKJTh:30
Stack trace:
#0 {main}
thrown in /in/MKJTh on line 30
Process exited with code 255.
tick_handler() called
Strict Standards: Non-static method C\E::foo() should not be called statically in /in/MKJTh on line 28
C
Fatal error: Class 'B\D' not found in /in/MKJTh on line 30
Process exited with code 255.