php的4种常用运行方式详解(2)

eric:~ youngeric$ php --rf date Function [ <internal:date> function date ] { - Parameters [2] { Parameter #0 [ <required> $format ] Parameter #1 [ <optional> $timestamp ] } }

查看类信息

eric:~ youngeric$ php --rc pdo Class [ <internal:PDO> class PDO ] { - Constants [89] { Constant [ integer PARAM_BOOL ] { 5 } Constant [ integer PARAM_NULL ] { 0 } Constant [ integer PARAM_INT ] { 1 } Constant [ integer PARAM_STR ] { 2 } Constant [ integer PARAM_LOB ] { 3 } Constant [ integer PARAM_STMT ] { 4 } Constant [ integer PARAM_INPUT_OUTPUT ] { 2147483648 } ......

检测php代码

eric:~ youngeric$ php -l jiance.php PHP Parse error: syntax error, unexpected end of file, expecting ',' or ';' in jiance.php on line 3 Errors parsing jiance.php

作为世界上最好的语言,php甚至还内置了服务器的功能(有没有很震惊的样子)。

eric:Desktop youngeric$ php -S 127.0.0.1:8080 PHP 5.5.38 Development Server started at Thu Dec 22 09:44:20 2016 Listening on :8080 Document root is /Users/youngeric/Desktop Press Ctrl-C to quit. [Thu Dec 22 09:44:29 2016] 127.0.0.1:52988 [404]: / - No such file or directory [Thu Dec 22 09:44:29 2016] 127.0.0.1:52989 [404]: /favicon.ico - No such file or directory

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/d90c7c6e0789aa96c95de61dafa4d801.html