-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcli-cgi.html
79 lines (65 loc) · 3.72 KB
/
cli-cgi.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CLI and CGI in PHP 5.0</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Lito && Óscar Otero">
<meta name="title" content="CLI and CGI in PHP 5.0">
<meta property="og:type" content="website">
<meta property="og:url" content="https://eusonlito.github.io/php-changes-cheatsheet">
<meta property="og:title" content="CLI and CGI in PHP 5.0">
<meta property="og:image" content="./images/social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="https://eusonlito.github.io/php-changes-cheatsheet">
<meta name="twitter:site" content="@lito_ordes">
<meta name="twitter:creator" content="@lito_ordes">
<meta name="twitter:title" content="CLI and CGI in PHP 5.0">
<meta name="twitter:image" content="./images/social.png">
<link href="//fonts.googleapis.com/css?family=Fira+Sans|Droid+Sans|Source+Sans+Pro" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="./phpnet.css?1744308666" type="text/css" media="screen">
<link rel="stylesheet" href="./styles.css?1744308666" type="text/css" media="screen">
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="./favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
<link rel="icon" href="./favicon.ico" type="image/x-icon">
<meta name="theme-color" content="#ffffff">
</head>
<body class="docs">
<section class="info-wrapper">
<nav id="head-nav" class="navbar">
<h1><a href="index.html"> CLI and CGI in PHP 5.0</a></h1>
</nav>
<main class="info-main">
<article id="layout-content" class="info-version">
<header class="info-version-header">
<h1><a href="https://www.php.net/manual/en/migration5.cli-cgi.php" target="_blank">PHP 5.0</a></h1>
</header>
<div id="migration5.cli-cgi" class="section">
<h2 class="title">CLI and CGI</h2>
<p class="para">
In PHP 5 there were some changes in CLI and CGI filenames. In PHP 5, the
CGI version was renamed to <var class="filename">php-cgi.exe</var> (previously
<var class="filename">php.exe</var>) and the CLI version now sits in the main
directory (previously <var class="filename">cli/php.exe</var>).
</p>
<p class="para">
In PHP 5 it was also introduced a new mode:
<var class="filename">php-win.exe</var>. This is equal to the CLI version, except
that php-win doesn't output anything and thus provides no console (no "dos
box" appears on the screen). This behavior is similar to php-gtk.
</p>
<p class="para">
In PHP 5, the CLI version will always populate the global
<var class="varname"><a target="_blank" href="https://www.php.net/manual/en/reserved.variables.argv.html" class="classname">$argv</a></var> and <var class="varname"><a target="_blank" href="https://www.php.net/manual/en/reserved.variables.argc.html" class="classname">$argc</a></var> variables regardless
of any <var class="filename">php.ini</var> directive setting. Even having
<a target="_blank" href="https://www.php.net/manual/en/ini.core.html#ini.register-argc-argv" class="link">register_argc_argv</a> set to
<code class="literal">off</code> will have no affect in CLI.
</p>
<p class="para">
See also the <a target="_blank" href="https://www.php.net/manual/en/features.commandline.html" class="link">command line
reference</a>.
</p>
</div></article> </main>
</section> </body>
</html>