<?php

$x = 'lions, tigers, and';
$y = 'bears, oh my!';
$z = '(from the )';
$items = [$x, $y, $z];
sort($items);

list($x, $y, $z) = $items;

echo <<<EOT
Case 1:
  x = $x
  y = $y
  z = $z

EOT;


$x = 77444;
$y = -12;
$z = 0;
$items = [$x, $y, $z];
sort($items);

list($x, $y, $z) = $items;

echo <<<EOT
Case 2:
  x = $x
  y = $y
  z = $z

EOT;