By default php returns NULL for function that doesn't do anything.
For example:
1 <?php
2
3 function foo() {
4 // Nothing here
5 }
6
7 var_dump(foo()); // the result will be NULL
I'm trying to implement an function that will have direct output and i don't need to return anything from inside the function, i what to obtain something like:
void var_dump()// it just only dumps information.
My function will generate a image but will not return any information. The image will be generated, after processing, using ImageJpeg($image) inside the function. The signature in php manual for imageJpeg is:
imagejpeg — Output image to browser or file
in this way I'll have output image and NULL returned from function. How can i avoid that. How can i obtain ONLY output image?
Thank you in advance.