PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/php/constants/runme.php

#
PHP | 28 lines | 22 code | 6 blank | 0 comment | 2 complexity | 5de75edfac7dea9cd81e78b3bc479a9b MD5 | raw file
 1<?php
 2
 3require "example.php";
 4
 5print "ICONST  = " . ICONST . " (should be 42)\n";
 6print "FCONST  = " . FCONST . " (should be 2.1828)\n";
 7print "CCONST  = " . CCONST . " (should be 'x')\n";
 8print "CCONST2 = " . CCONST2 . " (this should be on a new line)\n";
 9print "SCONST  = " . SCONST . " (should be 'Hello World')\n";
10print "SCONST2 = " . SCONST2 . " (should be '\"Hello World\"')\n";
11print "EXPR    = " . EXPR  . " (should be 48.5484)\n";
12print "iconst  = " . iconst . " (should be 37)\n";
13print "fconst  = " . fconst . " (should be 3.14)\n";
14
15if (EXTERN!="EXTERN") {
16    print "EXTERN = " . EXTERN . " (Arg! This shouldn't print anything)\n";
17} else {
18    print "EXTERN defaults to 'EXTERN', it probably isn't defined (good)\n";
19}
20
21if (FOO!="FOO") {
22    print "FOO    = " . FOO . "(Arg! This shouldn't print anything)\n";
23} else {
24    print "FOO defaults to 'FOO', it probably isn't defined (good)\n";
25}
26
27
28?>