Req #32435 [Opn->Csd]: Add '-run' option to php command line (like java -jar)
| From: | krakjoe@php.net | Date: | Tue, 29 Oct 2013 07:14:23 +0000 |
| Subject: | Req #32435 [Opn->Csd]: Add '-run' option to php command line (like java -jar) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182465@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=32435&edit=1
ID: 32435
Updated by: krakjoe@php.net
Reported by: sam_bravard at yahoo dot com
Summary: Add '-run' option to php command line (like java
-jar)
-Status: Open
+Status: Closed
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
PHP Version: 5.0.3
-Assigned To:
+Assigned To: krakjoe
Block user comment: N
Private report: N
New Comment:
PHP has no concept of main(), and it would be confusing to try to introduce one at this point.
Closing the request.
Previous Comments:
------------------------------------------------------------------------
[2005-03-23 21:47:18] sam_bravard at yahoo dot com
Description:
------------
Seems to me it would be great if the php5 command line tool ('php') had an option to run a
static main() method of a specified class just like java does:
eg:
php -run TTester TObject.php [args]
Which would call the main() in TTester:
TObjectToTest.php:
class TObjectToTest
{
// ... class that we'll want to test
}
class TTester {
public static main($args)
{
// execute tests on TObjectToTest
}
}
This would be particularly good for making it easy to bundle and run tests on each individual php
file.
Thoughts?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=32435&edit=1