Initialize them as arrays first:
$php_errors = array();
$php_success = array();
Problem solved. Using array_push requires the first param as an array, while currently they are null. This differs from using the ArrayAccess which would automatically populate:
$array = null;
$array = 'an item';
After that, you can use count, or just
will also work.