By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,716 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,716 IT Pros & Developers. It's quick & easy.

PERL or PHP for a regular console application?

P: n/a
Hello everyone,
Can someone help me in deciding the development language?

I need to develop a "regular console application" which will require -

1. Communication with another application over message queue
2. HTTP/HTTPS communication with another application
3. Parsing XML file
4. Persistent in memory for a range of commands execution

I have investigated the above features in PERL and PHP. It seems it is
possible to develop the application in PERL. I am a little bit
skeptical about PHP because as I know it is suitable for website
generation.

Can someone explain if the application is possible using PHP?
Is PHP suitable for regular console application?

Thanks in advance
A.R.John

Jul 17 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
ar********@hotmail.com wrote:

I need to develop a "regular console application" which will require -

1. Communication with another application over message queue
2. HTTP/HTTPS communication with another application
3. Parsing XML file
4. Persistent in memory for a range of commands execution


Yes - PHP can do all that. So can PERL.

HTH

C.
Jul 17 '05 #2

P: n/a
It is suitable. In fact you can write a fullblown unix deamon in PHP.
Shared memory, pcntl_fork(), ncurses, everything is there. There are
good tutorials out there, give google a try :)
On 26.04.2005 14:41, ar********@hotmail.com wrote:
Can someone explain if the application is possible using PHP?
Is PHP suitable for regular console application?

Thanks in advance
A.R.John

Jul 17 '05 #3

P: n/a
Possible, yes. Suitable? Probable not. PHP has a way of hogging more
and more memory while it runs a script. A good strategy for processing
web requests. Lousy when you're trying to write a daemon.

Perl is probably a better bet.

Jul 17 '05 #4

P: n/a
arjohn7...@hotmail.com wrote:
Hello everyone,
Can someone help me in deciding the development language?

I need to develop a "regular console application" which will require

-
<snip>
What about C?

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #5

P: n/a
One quick glance of an experienced eye allowed to understand the blurred
and almost unreadable ar********@hotmail.com's handwriting:
Hello everyone,
Can someone help me in deciding the development language?

I need to develop a "regular console application" which will require -

1. Communication with another application over message queue
2. HTTP/HTTPS communication with another application
3. Parsing XML file
4. Persistent in memory for a range of commands execution

I have investigated the above features in PERL and PHP. It seems it is
possible to develop the application in PERL. I am a little bit
skeptical about PHP because as I know it is suitable for website
generation.

Can someone explain if the application is possible using PHP?
Is PHP suitable for regular console application?

Thanks in advance
A.R.John


From these two - Python. :)
As powerful as Perl, but much cleaner and more elegant.

Cheers
Mike
Jul 17 '05 #6

P: n/a
> From these two - Python. :)
As powerful as Perl, but much cleaner and more elegant.


or ruby :)
or maybe asm is suited as well? :)
Jul 17 '05 #7

P: n/a
ar********@hotmail.com wrote:
Hello everyone,
Can someone help me in deciding the development language?

I need to develop a "regular console application" which will require -

1. Communication with another application over message queue
2. HTTP/HTTPS communication with another application
3. Parsing XML file
4. Persistent in memory for a range of commands execution

I have investigated the above features in PERL and PHP. It seems it is
possible to develop the application in PERL. I am a little bit
skeptical about PHP because as I know it is suitable for website
generation.

Can someone explain if the application is possible using PHP?
Is PHP suitable for regular console application?

Thanks in advance
A.R.John


I would personally use perl, however check this out:
http://www.phpbuilder.com/columns/darrell20000319.php3

php can be used as a shell scripting lang. Is that what u are talking about?

2nd, you seem to want it to run a a daemon, wont MaxExecutionTime affect
that?
Jul 17 '05 #8

P: n/a
Edward Pearson wrote:
I would personally use perl, however check this out:
http://www.phpbuilder.com/columns/darrell20000319.php3

php can be used as a shell scripting lang. Is that what u are talking
about?

2nd, you seem to want it to run a a daemon, wont MaxExecutionTime affect
that?


the maximum execution time can be changed using the set_time_limit
function. You can set_time_limit(0) to remove the limit.

PHP is also capable of everything that is desired. I have don several
console-based application using PHP. The main one I have done is a bot
which connects to IRC, similar to eggdrops. I've also made scripts
which downloads and parse information from various sites, some of which
use XML as a datatransport, and I've made socket-servers before which
accept connections and perform certain functions based on the input.

So php is capable, how suitable it is depends on the specifics of the
requirements, and also how knowledged you are at perl vs. php.
Jul 17 '05 #9

P: n/a
ar********@hotmail.com wrote:
Hello everyone,
Can someone help me in deciding the development language?

I need to develop a "regular console application" which will require -

1. Communication with another application over message queue
2. HTTP/HTTPS communication with another application
3. Parsing XML file
4. Persistent in memory for a range of commands execution

I have investigated the above features in PERL and PHP. It seems it is
possible to develop the application in PERL. I am a little bit
skeptical about PHP because as I know it is suitable for website
generation.

Can someone explain if the application is possible using PHP?
Is PHP suitable for regular console application?

Thanks in advance
A.R.John


Just look at the function list, PHP is full-blown language suitable for any
task. Since discovering PHP I don't use anything else.

One caveat: I have no experience with using it to write a DESKTOP app, for
user interface I do only web, so can't talk about desktop apps.
--
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth@(Sec)ure(Dat)a(.com)
Jul 17 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.