- var_dump: documentation ( source)
<?php
class Foo {
protected $titleInfo = [];
public function bar() {
$key = '';
if ( !isset( $this->titleInfo[$key] ) ) {
$this->titleInfo[$key] = [ 42 ];
}
var_dump( $this->titleInfo[$key] );
}
}
( new Foo )->bar();