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 | |
$i = 0; | |
$_SESSION['k'] = 0; | |
while ($i<1000){ | |
do_mail($i); | |
$i++; | |
} |
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 | |
/** | |
* The code from http://php.net/manual/en/imagick.examples-1.php | |
* | |
* Make sure only using PHP builtin fonts(http://php.net/manual/en/haru.builtin.fonts.php) | |
* | |
* @package PhpFiddle | |
* @link http://phpfiddle.org | |
* @since 2012 |
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 | |
class Compare | |
{ | |
private static $instance = null; | |
private function __construct() | |
{ | |
} | |
public function is($a, $b, $condition) | |
{ | |
$meth = array( |
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 | |
class Compare | |
{ | |
private static $instance = null; | |
private function __construct() | |
{ | |
} | |
public function is($a, $b, $condition) | |
{ | |
$meth = array( |
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
<pre> | |
<?php | |
$var = "семен петрович"; | |
$arr = ['c кавычками'=>'\''.$var."'", 'без кавычек'=>$var, 'второй варииант'=>"'$var'", 'по другому'=>"\"$var\"", 'по другому2'=>'"'.$var.'"', 'жестоко'=>'«'.$var.'»']; | |
print_r($arr); | |
?></pre> |
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 | |
function getimg($sizeindex, $imgname ){ | |
$imgsizes = array( | |
'x1267'=>'This is size 0 ' . $imgname , | |
'x1268'=>'this is size 1 '. $imgname, | |
'x1269'=>'this is size two '. $imgname, | |
'x1210'=>'this is size three '. $imgname, | |
); | |
echo "My favorite number is " . $imgsizes[$sizeindex]; |
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 | |
//this is a single comment | |
#this is also a single line comment | |
/*this is a multiple | |
line comment | |
*/ | |
//PHP statement end with a semicolon |
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 'Hello world'; | |
?> |
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 'sample code'; | |
?> |
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 'Hello World'; | |
?> |