- var_dump: documentation ( source)
<?php
echo "The 'Wee, inline callables are sort of function things' ";
class q {function foo($str) {return 'moo '.$str; } }
var_dump(([new q, 'foo'])('cow'));
function bar( ) { return 'cow'; }
var_dump('bar'( ));
echo "The 'I'm amazed PHP doesn't mess this up' ";
foreach ($Array = [[12 => 'Moo'], [13 => 'Cow']] as $Array) {
var_dump($Array);
}
echo "The 'PHP Variables MUST NOT contain some symbols... for very soft values of MUST NOT' ";
${'$0a'} = 12; ${'0a'} = 13;
var_dump(${'$0a'}); var_dump(${'0a'});
// $0a is invalid and $$0a is even more invalid, with spinkles
echo "The 'Good luck and thanks for all the cows' ";
@var_dump(0x2&${$Array=['cow'=>3]}['cow']);
echo "The 'Hurrah BC breaks, if your program broke because of this you're a bad person' ";
list($a[],$a[])=$a=[1,2];
var_dump($a);