Using Reflection to access protected properties in PHP
Here is how to access protected class properties. Reflection is generally a method for inspecting classes and modify its logic at execution time.
<?php
$class = new ReflectionClass($classInstance);
$property = $class->getProperty("properties");
$property->setAccessible(true);
$properties = $property->getValue($number);