- var_export: documentation ( source)
- array_pop: documentation ( source)
<?php
class k {
public $values = array('coke', 'fanta', 'sprite');
function get() {
return $this->values;
}
function print() {
var_export($this->values);
}
}
$obj = new k();
$tmp = $obj->get();
$item = array_pop($tmp);
var_export($tmp);
var_export($item);
$obj->print();