- array_push: documentation ( source)
- var_dump: documentation ( source)
<?php
class X {
public $_cache_tags = ['default', 'stuff'];
public function shit() {
$this->_cache_tags[] = 'this works';
array_push($this->_cache_tags, 'this too');
}
}
$x = new X();
$x->shit();
var_dump($x->_cache_tags);