cvs: php-src /sapi/cli/tests 001.phpt 002-win32.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010-2.phpt 010.phpt
011.phpt 012.phpt 013.phpt 014.phpt skipif.inc

From: Date: Fri, 24 Nov 2006 13:32:07 +0000
Subject: cvs: php-src /sapi/cli/tests 001.phpt 002-win32.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010-2.phpt 010.phpt
011.phpt 012.phpt 013.phpt 014.phpt skipif.inc
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-41718@lists.php.net to get a copy of this message
tony2001 Fri Nov 24 13:32:07 2006 UTC Added files: /php-src/sapi/cli/tests 001.phpt 002-win32.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010-2.phpt 010.phpt 011.phpt 012.phpt 013.phpt 014.phpt skipif.inc Log: add tests for CLI

http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/001.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/001.phpt +++ php-src/sapi/cli/tests/001.phpt --TEST-- version string --SKIPIF-- <?php include "skipif.inc"; ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`"$php" -n -v`); echo "Done\n"; ?> --EXPECTF-- string(%d) "PHP %s (cli) (built: %s)%s Copyright (c) 1997-20%d The PHP Group Zend Engine v%s, Copyright (c) 1998-20%d Zend Technologies " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/002-win32.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/002-win32.phpt +++ php-src/sapi/cli/tests/002-win32.phpt --TEST-- running code with -r --SKIPIF-- <?php include "skipif.inc"; if (substr(PHP_OS, 0, 3) != 'WIN') { die ("skip only for Windows"); } ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`"$php" -r "var_dump('hello');"`); echo "Done\n"; ?> --EXPECTF-- string(18) "string(5) "hello" " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/002.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/002.phpt +++ php-src/sapi/cli/tests/002.phpt --TEST-- running code with -r --SKIPIF-- <?php include "skipif.inc"; if (substr(PHP_OS, 0, 3) == 'WIN') { die ("skip not for Windows"); } ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`"$php" -r 'var_dump("hello");'`); echo "Done\n"; ?> --EXPECTF-- string(18) "string(5) "hello" " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/003.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/003.phpt +++ php-src/sapi/cli/tests/003.phpt --TEST-- defining INI options with -d --SKIPIF-- <?php include "skipif.inc"; if (substr(PHP_OS, 0, 3) == 'WIN') { die ("skip not for Windows"); } ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`"$php" -n -d max_execution_time=111 -r 'var_dump(ini_get("max_execution_time"));'`); var_dump(`"$php" -n -d max_execution_time=500 -r 'var_dump(ini_get("max_execution_time"));'`); var_dump(`"$php" -n -d max_execution_time=500 -d max_execution_time=555 -r 'var_dump(ini_get("max_execution_time"));'`); var_dump(`"$php" -n -d upload_tmp_dir=/test/path -d max_execution_time=555 -r 'var_dump(ini_get("max_execution_time")); var_dump(ini_get("upload_tmp_dir"));'`); echo "Done\n"; ?> --EXPECTF-- string(16) "string(3) "111" " string(16) "string(3) "500" " string(16) "string(3) "555" " string(40) "string(3) "555" string(10) "/test/path" " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/004.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/004.phpt +++ php-src/sapi/cli/tests/004.phpt --TEST-- show information about function --SKIPIF-- <?php include "skipif.inc"; ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`"$php" --rf unknown`); var_dump(`"$php" --rf echo`); var_dump(`"$php" --rf phpinfo`); echo "Done\n"; ?> --EXPECTF-- string(45) "Exception: Function unknown() does not exist " string(42) "Exception: Function echo() does not exist " string(119) "Function [ <internal:standard> function phpinfo ] { - Parameters [1] { Parameter #0 [ <optional> $what ] } } " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/005.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/005.phpt +++ php-src/sapi/cli/tests/005.phpt --TEST-- show information about class --SKIPIF-- <?php include "skipif.inc"; ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`"$php" --rc unknown`); var_dump(`"$php" --rc stdclass`); var_dump(`"$php" --rc exception`); echo "Done\n"; ?> --EXPECTF-- string(40) "Exception: Class unknown does not exist " string(178) "Class [ <internal> class stdClass ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [0] { } } " string(1141) "Class [ <internal> class Exception ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [6] { Property [ <default> protected $message ] Property [ <default> private $string ] Property [ <default> protected $code ] Property [ <default> protected $file ] Property [ <default> protected $line ] Property [ <default> private $trace ] } - Methods [9] { Method [ <internal> final private method __clone ] { } Method [ <internal, ctor> public method __construct ] { - Parameters [2] { Parameter #0 [ <optional> $message ] Parameter #1 [ <optional> $code ] } } Method [ <internal> final public method getMessage ] { } Method [ <internal> final public method getCode ] { } Method [ <internal> final public method getFile ] { } Method [ <internal> final public method getLine ] { } Method [ <internal> final public method getTrace ] { } Method [ <internal> final public method getTraceAsString ] { } Method [ <internal> public method __toString ] { } } } " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/006.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/006.phpt +++ php-src/sapi/cli/tests/006.phpt --TEST-- show information about extension --SKIPIF-- <?php include "skipif.inc"; ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`"$php" --re unknown`); var_dump(`"$php" --re ""`); var_dump(`"$php" -n --re date`); echo "Done\n"; ?> --EXPECTF-- string(44) "Exception: Extension unknown does not exist " string(37) "Exception: Extension does not exist " string(%d) "Extension [ <persistent> extension #%d date version %s ] { - Dependencies { Dependency [ session (Optional) ] } - INI { Entry [ date.timezone <ALL> ] Current = '' } Entry [ date.default_latitude <ALL> ] Current = '%s' } Entry [ date.default_longitude <ALL> ] Current = '%s' } Entry [ date.sunset_zenith <ALL> ] Current = '%s' } Entry [ date.sunrise_zenith <ALL> ] Current = '%s' } } - Constants [14] { Constant [ string DATE_ATOM ] { Y-m-d\TH:i:sP } Constant [ string DATE_COOKIE ] { l, d-M-y H:i:s T } Constant [ string DATE_ISO8601 ] { Y-m-d\TH:i:sO } Constant [ string DATE_RFC822 ] { D, d M y H:i:s O } Constant [ string DATE_RFC850 ] { l, d-M-y H:i:s T } Constant [ string DATE_RFC1036 ] { D, d M y H:i:s O } Constant [ string DATE_RFC1123 ] { D, d M Y H:i:s O } Constant [ string DATE_RFC2822 ] { D, d M Y H:i:s O } Constant [ string DATE_RFC3339 ] { Y-m-d\TH:i:sP } Constant [ string DATE_RSS ] { D, d M Y H:i:s O } Constant [ string DATE_W3C ] { Y-m-d\TH:i:sP } Constant [ integer SUNFUNCS_RET_TIMESTAMP ] { 0 } Constant [ integer SUNFUNCS_RET_STRING ] { 1 } Constant [ integer SUNFUNCS_RET_DOUBLE ] { 2 } } - Functions { Function [ <internal:date> function strtotime ] { - Parameters [2] { Parameter #0 [ <required> $time ] Parameter #1 [ <optional> $now ] } } Function [ <internal:date> function date ] { - Parameters [2] { Parameter #0 [ <required> $format ] Parameter #1 [ <optional> $timestamp ] } } Function [ <internal:date> function idate ] { - Parameters [2] { Parameter #0 [ <required> $format ] Parameter #1 [ <optional> $timestamp ] } } Function [ <internal:date> function gmdate ] { - Parameters [2] { Parameter #0 [ <required> $format ] Parameter #1 [ <optional> $timestamp ] } } Function [ <internal:date> function mktime ] { - Parameters [6] { Parameter #0 [ <optional> $hour ] Parameter #1 [ <optional> $min ] Parameter #2 [ <optional> $sec ] Parameter #3 [ <optional> $mon ] Parameter #4 [ <optional> $day ] Parameter #5 [ <optional> $year ] } } Function [ <internal:date> function gmmktime ] { - Parameters [6] { Parameter #0 [ <optional> $hour ] Parameter #1 [ <optional> $min ] Parameter #2 [ <optional> $sec ] Parameter #3 [ <optional> $mon ] Parameter #4 [ <optional> $day ] Parameter #5 [ <optional> $year ] } } Function [ <internal:date> function checkdate ] { - Parameters [3] { Parameter #0 [ <required> $month ] Parameter #1 [ <required> $day ] Parameter #2 [ <required> $year ] } } Function [ <internal:date> function strftime ] { - Parameters [2] { Parameter #0 [ <required> $format ] Parameter #1 [ <optional> $timestamp ] } } Function [ <internal:date> function gmstrftime ] { - Parameters [2] { Parameter #0 [ <required> $format ] Parameter #1 [ <optional> $timestamp ] } } Function [ <internal:date> function time ] { - Parameters [0] { } } Function [ <internal:date> function localtime ] { - Parameters [2] { Parameter #0 [ <optional> $timestamp ] Parameter #1 [ <optional> $associative_array ] } } Function [ <internal:date> function getdate ] { - Parameters [1] { Parameter #0 [ <optional> $timestamp ] } } Function [ <internal:date> function date_create ] { } Function [ <internal:date> function date_parse ] { } Function [ <internal:date> function date_format ] { } Function [ <internal:date> function date_format_locale ] { } Function [ <internal:date> function date_modify ] { } Function [ <internal:date> function date_timezone_get ] { } Function [ <internal:date> function date_timezone_set ] { } Function [ <internal:date> function date_offset_get ] { } Function [ <internal:date> function date_time_set ] { } Function [ <internal:date> function date_date_set ] { } Function [ <internal:date> function date_isodate_set ] { } Function [ <internal:date> function timezone_open ] { } Function [ <internal:date> function timezone_name_get ] { } Function [ <internal:date> function timezone_name_from_abbr ] { } Function [ <internal:date> function timezone_offset_get ] { } Function [ <internal:date> function timezone_transitions_get ] { } Function [ <internal:date> function timezone_identifiers_list ] { } Function [ <internal:date> function timezone_abbreviations_list ] { } Function [ <internal:date> function date_default_timezone_set ] { - Parameters [1] { Parameter #0 [ <required> $timezone_identifier ] } } Function [ <internal:date> function date_default_timezone_get ] { - Parameters [0] { } } Function [ <internal:date> function date_sunrise ] { - Parameters [6] { Parameter #0 [ <required> $time ] Parameter #1 [ <optional> $format ] Parameter #2 [ <optional> $latitude ] Parameter #3 [ <optional> $longitude ] Parameter #4 [ <optional> $zenith ] Parameter #5 [ <optional> $gmt_offset ] } } Function [ <internal:date> function date_sunset ] { - Parameters [6] { Parameter #0 [ <required> $time ] Parameter #1 [ <optional> $format ] Parameter #2 [ <optional> $latitude ] Parameter #3 [ <optional> $longitude ] Parameter #4 [ <optional> $zenith ] Parameter #5 [ <optional> $gmt_offset ] } } Function [ <internal:date> function date_sun_info ] { - Parameters [3] { Parameter #0 [ <required> $time ] Parameter #1 [ <required> $latitude ] Parameter #2 [ <required> $longitude ] } } } - Classes [2] { Class [ <internal:date> class DateTime ] { - Constants [11] { Constant [ string ATOM ] { Y-m-d\TH:i:sP } Constant [ string COOKIE ] { l, d-M-y H:i:s T } Constant [ string ISO8601 ] { Y-m-d\TH:i:sO } Constant [ string RFC822 ] { D, d M y H:i:s O } Constant [ string RFC850 ] { l, d-M-y H:i:s T } Constant [ string RFC1036 ] { D, d M y H:i:s O } Constant [ string RFC1123 ] { D, d M Y H:i:s O } Constant [ string RFC2822 ] { D, d M Y H:i:s O } Constant [ string RFC3339 ] { Y-m-d\TH:i:sP } Constant [ string RSS ] { D, d M Y H:i:s O } Constant [ string W3C ] { Y-m-d\TH:i:sP } } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [9] { Method [ <internal:date, ctor> public method __construct ] { } Method [ <internal:date> public method format ] { } Method [ <internal:date> public method modify ] { } Method [ <internal:date> public method getTimezone ] { } Method [ <internal:date> public method setTimezone ] { } Method [ <internal:date> public method getOffset ] { } Method [ <internal:date> public method setTime ] { } Method [ <internal:date> public method setDate ] { } Method [ <internal:date> public method setISODate ] { } } } Class [ <internal:date> class DateTimeZone ] { - Constants [0] { } - Static properties [0] { } - Static methods [2] { Method [ <internal:date> static public method listAbbreviations ] { } Method [ <internal:date> static public method listIdentifiers ] { } } - Properties [0] { } - Methods [4] { Method [ <internal:date, ctor> public method __construct ] { } Method [ <internal:date> public method getName ] { } Method [ <internal:date> public method getOffset ] { } Method [ <internal:date> public method getTransitions ] { } } } } } " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/007.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/007.phpt +++ php-src/sapi/cli/tests/007.phpt --TEST-- strip comments and whitespace with -w --SKIPIF-- <?php include "skipif.inc"; if (substr(PHP_OS, 0, 3) == 'WIN') { die ("skip not for Windows"); } ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; $filename = dirname(__FILE__).'/007.test.php'; $code =' <?php /* some test script */ class test { /* {{{ */ public $var = "test"; //test var #perl style comment private $pri; /* private attr */ function foo(/* void */) { } } /* }}} */ ?> '; file_put_contents($filename, $code); var_dump(`"$php" -w "$filename"`); var_dump(`"$php" -w "wrong"`); var_dump(`echo "<?php /* comment */ class test {\n // comment \n function foo() {} } ?>" | $php -w`); @unlink($filename); echo "Done\n"; ?> --EXPECTF-- string(81) " <?php class test { public $var = "test"; private $pri; function foo() { } } ?> " string(33) "Could not open input file: wrong " string(43) "<?php class test { function foo() {} } ?> " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/008.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/008.phpt +++ php-src/sapi/cli/tests/008.phpt --TEST-- execute a file with -f --SKIPIF-- <?php include "skipif.inc"; if (substr(PHP_OS, 0, 3) == 'WIN') { die ("skip not for Windows"); } ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; $filename = dirname(__FILE__).'/008.test.php'; $code =' <?php class test { private $pri; } var_dump(test::$pri); ?> '; file_put_contents($filename, $code); var_dump(`"$php" -f "$filename"`); var_dump(`"$php" -f "wrong"`); @unlink($filename); echo "Done\n"; ?> --EXPECTF-- string(%d) " Fatal error: Cannot access private property test::$pri in %s on line %d " string(33) "Could not open input file: wrong " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/009.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/009.phpt +++ php-src/sapi/cli/tests/009.phpt --TEST-- using invalid combinations of cmdline options --SKIPIF-- <?php include "skipif.inc"; ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`"$php" -n -c -r 'echo hello;'`); var_dump(`"$php" -a -r 'echo hello;'`); var_dump(`"$php" -r 'echo hello;' -a`); echo "Done\n"; ?> --EXPECTF-- string(55) "You cannot use both -n and -c switch. Use -h for help. " string(57) "Either execute direct code, process stdin or use a file. " string(57) "Either execute direct code, process stdin or use a file. " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/010-2.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/010-2.phpt +++ php-src/sapi/cli/tests/010-2.phpt --TEST-- executing a code with -R --SKIPIF-- <?php include "skipif.inc"; if (substr(PHP_OS, 0, 3) == 'WIN') { die ("skip not for Windows"); } ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; $filename_txt = dirname(__FILE__)."/010.test.txt"; $txt = ' test hello '; file_put_contents($filename_txt, $txt); var_dump(`cat "$filename_txt" | "$php" -R "var_dump(1);"`); @unlink($filename_txt); echo "Done\n"; ?> --EXPECTF-- string(21) "int(1) int(1) int(1) " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/010.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/010.phpt +++ php-src/sapi/cli/tests/010.phpt --TEST-- executing a file with -F --SKIPIF-- <?php include "skipif.inc"; if (substr(PHP_OS, 0, 3) == 'WIN') { die ("skip not for Windows"); } ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; $filename = dirname(__FILE__)."/010.test.php"; $filename_txt = dirname(__FILE__)."/010.test.txt"; $code = ' <?php var_dump(fread(STDIN, 10)); ?> '; file_put_contents($filename, $code); $txt = ' test hello '; file_put_contents($filename_txt, $txt); var_dump(`cat "$filename_txt" | "$php" -F "$filename"`); @unlink($filename); @unlink($filename_txt); echo "Done\n"; ?> --EXPECTF-- string(38) " string(10) "test hello" bool(false) " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/011.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/011.phpt +++ php-src/sapi/cli/tests/011.phpt --TEST-- syntax check --SKIPIF-- <?php include "skipif.inc"; ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; $filename = dirname(__FILE__)."/011.test.php"; $code = ' <?php $test = "var"; class test { private $var; } echo test::$var; ?> '; file_put_contents($filename, $code); var_dump(`"$php" -l "$filename"`); var_dump(`"$php" -l some.unknown`); $code = ' <?php class test private $var; } ?> '; file_put_contents($filename, $code); var_dump(`"$php" -l "$filename"`); @unlink($filename); echo "Done\n"; ?> --EXPECTF-- string(%d) "No syntax errors detected in %s011.test.php " string(40) "Could not open input file: some.unknown " string(%d) " Parse error: syntax error, unexpected T_PRIVATE, expecting '{' in %s on line %d Errors parsing %s011.test.php " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/012.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/012.phpt +++ php-src/sapi/cli/tests/012.phpt --TEST-- invalid arguments and error messages --SKIPIF-- <?php include "skipif.inc"; ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; var_dump(`"$php" -F some.php -F some.php`); var_dump(`"$php" -F some.php -R some.php`); var_dump(`"$php" -R some.php -F some.php`); var_dump(`"$php" -R some.php -R some.php`); var_dump(`"$php" -f some.php -f some.php`); var_dump(`"$php" -B '' -B ''`); var_dump(`"$php" -E '' -E ''`); var_dump(`"$php" -r "" -r ""`); echo "Done\n"; ?> --EXPECTF-- string(32) "You can use -R or -F only once. " string(32) "You can use -R or -F only once. " string(32) "You can use -R or -F only once. " string(32) "You can use -R or -F only once. " string(26) "You can use -f only once. " string(26) "You can use -B only once. " string(26) "You can use -E only once. " string(26) "You can use -r only once. " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/013.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/013.phpt +++ php-src/sapi/cli/tests/013.phpt --TEST-- running PHP code before and after processing input lines with -B and -E --SKIPIF-- <?php include "skipif.inc"; if (substr(PHP_OS, 0, 3) == 'WIN') { die ("skip not for Windows"); } ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; $filename_txt = dirname(__FILE__)."/013.test.txt"; file_put_contents($filename_txt, "test\nfile\ncontents\n"); var_dump(`cat "$filename_txt" | "$php" -B 'var_dump("start");'`); var_dump(`cat "$filename_txt" | "$php" -E 'var_dump("end");'`); var_dump(`cat "$filename_txt" | "$php" -B 'var_dump("start");' -E 'var_dump("end");'`); @unlink($filename_txt); echo "Done\n"; ?> --EXPECTF-- string(18) "string(5) "start" " string(16) "string(3) "end" " string(34) "string(5) "start" string(3) "end" " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/014.phpt?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/014.phpt +++ php-src/sapi/cli/tests/014.phpt --TEST-- syntax highlighting --SKIPIF-- <?php include "skipif.inc"; ?> --FILE-- <?php $php = $_ENV['TEST_PHP_EXECUTABLE']; $filename = dirname(__FILE__)."/014.test.php"; $code = ' <?php $test = "var"; //var /* test class */ class test { private $var = array(); public static function foo(Test $arg) { echo "hello"; var_dump($this); } } $o = new test; ?> '; file_put_contents($filename, $code); var_dump(`"$php" -n -s "$filename"`); var_dump(`"$php" -n -s "unknown"`); @unlink($filename); echo "Done\n"; ?> --EXPECTF-- string(1478) "<code><span style="color: #000000"> <br /><span style="color: #0000BB">&lt;?php<br />$test&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"var"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//var<br />/*&nbsp;test&nbsp;class&nbsp;*/<br /></span><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">test&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;</span><span style="color: #0000BB">$var&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;static&nbsp;function&nbsp;</span><span style="color: #0000BB">foo</span><span style="color: #007700">(</span><span style="color: #0000BB">Test&nbsp;$arg</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"hello"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span! ><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br /></span><span style="color: #0000BB">$o&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">test</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;<br /></span> </span> </code>" string(35) "Could not open input file: unknown " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/skipif.inc?view=markup&rev=1.1 Index: php-src/sapi/cli/tests/skipif.inc +++ php-src/sapi/cli/tests/skipif.inc <?php if (php_sapi_name() != "cli") { die("skip CLI only"); } ?>
« previous php.cvs (#41718) next »