Source Code:
(back to article)
<?php $empty_array = array(); $last_element = array_pop($empty_array); if (empty($empty_array)) { echo "Array is empty"; } if (is_null($last_element)) { echo "No element to pop"; } ?>
Result:
Report an issue