summaryrefslogtreecommitdiff
path: root/php/test/Ice/scope/Client.php
blob: d161665c5aa4366e36fa35157fad3a0e5a51edb7 (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
31
32
33
<?php
// **********************************************************************
//
// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

error_reporting(E_ALL | E_STRICT);

if(!extension_loaded("ice"))
{
    echo "\nerror: Ice extension is not loaded.\n\n";
    exit(1);
}

function foo()
{
    $NS = function_exists("Ice\\initialize");
    require_once ($NS ? 'Ice_ns.php' : 'Ice.php');
    require_once 'IceGrid.php';
}

echo "testing generated code in a non-global scope... ";
flush();

foo();

echo "ok\n";

?>