This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<global> | |
... | |
<cache> | |
<backend>apc</backend> | |
<prefix>MAGE_</prefix> | |
</cache> | |
... | |
</global> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<global> | |
... | |
<cache> | |
<backend>memcached</backend> | |
<memcached> | |
<servers> | |
<server> | |
<host><![CDATA[127.0.0.1]]></host> | |
<port><![CDATA[11211]]></port> | |
<persistent><![CDATA[1]]></persistent> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apc.max_file_size = 10M | |
apc.shm_size = 128M |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php test.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php cli.php arg1 arg2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "There are {$argc} passed: ".PHP_EOL; | |
foreach($argv as $k=>$v){ | |
echo "Argument {$k}: {$v}".PHP_EOL; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php test.php < test.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$stdin = fopen('php://stdin', 'r'); | |
$stdout = fopen('php://stdout', 'w'); | |
$stderr = fopen('php://stderr', 'w'); | |
while(!feof($stdin)){ | |
$line = trim(fgets($stdin)); | |
if(strlen($line) > 0){ | |
fwrite($stdout,strrev($line).PHP_EOL); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
while(!feof(STDIN)){ | |
$line = trim(fgets(STDIN)); | |
if(strlen($line) > 0){ | |
fwrite(STDOUT,strrev($line).PHP_EOL); | |
} else { | |
fwrite(STDERR,"An empty line was passed".PHP_EOL); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php -s test.phps | |
<code><span style="color: #000000"> | |
<span style="color: #0000BB"><?php<br /></span><span style="color: #007700">if(</span><span style="color: #0000BB">$_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'a'</span><span style="color: #007700">] == </span><span style="color: #DD0000">'b'</span><span style="color: #007700">){<br /> echo </span><span style="color: #DD0000">'Some output'</span><span style="color: #007700">;<br />}<br /></span> | |
</span> | |
</code> | |
$ |
OlderNewer