View fiddle_076338.php
<?php
$dexLines = "DXS*CNV DE32*VA*V1/1*1
ST*001*0001
ID1*000000*CRANE--VER 43210 ****000000
ID5*180525*0926
CA6*83
VA1*30260*139*30260*139
CA3****154*16990**1590
CA4***3670
CA15*5090
View fiddle_029528.php
<?php
$i = 0;
$_SESSION['k'] = 0;
while ($i<1000){
do_mail($i);
$i++;
}
View fiddle_060562.php
<?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
View fiddle_015079.php
<?php
class Compare
{
private static $instance = null;
private function __construct()
{
}
public function is($a, $b, $condition)
{
$meth = array(
View fiddle_055530.php
<?php
class Compare
{
private static $instance = null;
private function __construct()
{
}
public function is($a, $b, $condition)
{
$meth = array(
View fiddle_042867.php
<pre>
<?php
$var = "семен петрович";
$arr = ['c кавычками'=>'\''.$var."'", 'без кавычек'=>$var, 'второй варииант'=>"'$var'", 'по другому'=>"\"$var\"", 'по другому2'=>'"'.$var.'"', 'жестоко'=>'&laquo;'.$var.'&raquo;'];
print_r($arr);
?></pre>
View fiddle_058813.php
<?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];
View fiddle_040668.php
<?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
View fiddle_079137.php
<?php
echo 'Hello world';
?>
View fiddle_096610.php
<?php
echo 'sample code';
?>