/[A3C]/t/test.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /t/test.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 133 - (show annotations)
Fri May 30 20:04:23 2008 UTC (11 years, 7 months ago) by dpavlin
File size: 782 byte(s)
Added Parse::RecDescent PHP parser based on PHP::Include

PHP::Include puts new variables in current scope, while we
prefer to get single hash with all defined values.
1 <?php
2
3 # comment
4 // another comment
5
6 $number1=123;
7 $number2 = 123.45;
8
9 $string1 = 'McHenry, IL';
10 $string2 = "Trenton, NJ";
11
12 $array1 = Array( 123 );
13 $array2 = Array( 123, 456, 789 );
14 $array3 = Array( "abc" );
15 $array4 = Array( "abc", "def", "ghi" );
16
17 $hash1 = Array( 'a' => 1 );
18 $hash2 = Array( 'a' => 1, 'b' => 2, 'c' => 3 );
19 $hash3 = Array( 1 => 'a', 'foo' => "bar", 123.45 => 'moog' );
20
21 $hash4 = Array(
22 'abe' => 'Abraham Lincoln',
23 'larry' => 'Larry Wall'
24 );
25
26 define( "TEST_CONSTANT", 'NJ and you, perfect together' );
27 define( "ANOTHER_CONSTANT", "NJ, the garden state" );
28 define( "YETANOTHER_CONSTANT", 80 );
29
30 $hash5 = Array( 'constant' => TEST_CONSTANT );
31 $array5 = Array( 'test', ANOTHER_CONSTANT );
32
33 $hash6 = Array( 'foo' => 'bar', );
34 $array6 = Array( 'foo', );
35
36 ?>

  ViewVC Help
Powered by ViewVC 1.1.26