- var_dump: documentation ( source)
- ini_set: documentation ( source)
- error_reporting: documentation ( source)
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
function by_ref(&$value) {
echo "Call by ref value:\n";
var_dump($value);
}
function by_value($value) {
echo "Call by value value:\n";
var_dump($value);
}
$thing = array(1,2);
echo "Before call by ref:\n";
var_dump($thing);
by_ref($thing[5][6]);
echo "After call by ref:\n";
var_dump($thing);
echo "Before call by value\n";
by_value($thing[7][8]);
echo "After call by value:\n";
var_dump($thing);
echo "Before call by ref again:\n";
by_ref($thing[7][8]);
echo "After call by ref again:\n";
var_dump($thing);
echo "isset:\n";
var_dump(isset($thing[9][10]));