Skip to content

Instantly share code, notes, and snippets.

@prasoon054
prasoon054 / gist:647e1ad095d109122883445d0dda7b17
Last active June 16, 2025 10:30
PHP Program to find min, max of the array.
<?php
// Function to find the minimum, maximum, and sort the array
function processArray($numbers) {
$min = min($numbers);
$max = max($numbers);
sort($numbers);
return [
'min' => $min,
'max' => $max,
'sorted' => $numbers