php CLI useful commands

WBOY
Release: 2016-07-30 13:29:38
Original
922 people have browsed it

CLI is actually a window like CMD, you can enter commands and return results. Here are some useful ones:

1. View function: php --rf function_name

2. Accept input: php -r "$name = fgets(STDIN);"

3. Prompt for input: php -r "fwrite( STDOUT,'Enter your name' );" // Anyone who has studied C++ syntax knows that std is standard input Output stream

combination: php -r "fwrite(STDOUT,'Enter your name'); $name = fgets(STDIN);fwrite(STDOUT,$name.'welcome back');"

4 .

Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above has introduced the useful commands of php CLI, including related content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!