you're reading...

Php from Command Line

A really simple, still useful tip for php developers.

It is possible to execute a php command directly from the command line by doing the following:

php -r 'COMMAND'

For example:

php -r 'echo substr("hello world", 6);'


About these ads

About Roberto Aloi

Software Engineer and Erlanger. Author of www.tryerlang.org.


No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: