- Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.15
- Parse error: syntax error, unexpected 'var_dump' (T_STRING), expecting ',' or ';' in /in/fU5oH on line 35
Process exited with code 255.
<?php
$dtArray = array();
$dtArray[] = new DateTime();
$dtArray[] = new DateTime();
foreach($dtArray as $value)
{
$value = null;
}
echo "object NOT reference: \n";
var_dump($dtArray);
$dtArrayRef = array();
$dtArrayRef[] = new DateTime();
$dtArrayRef[] = new DateTime();
foreach($dtArrayRef as &$value)
{
$value = null;
}
echo "object REFERENCE: \n"
var_dump($dtArrayRef);
$string = array();
$string[] = 'new DateTime();';
$string[] = 'new DateTime();';
foreach($string as $value)
{
$value = null;
}
echo "string NOT reference: \n"
var_dump($string);