What you should do is to make the parameter sent to hello_square() a
reference, this is done by the following (keep in mind this uses the
new and fast parameter parsing API, but it is still do-able with the
old zend_parse_parameters()):
https://gist.github.com/KalleZ/69f9ca1895bcac945e110b7777104203
Take a look at the README.PARAMETER_PARSING_API in the root of
php-src, this includes all possible values that
zend_parse_parameters() can accept