<?php $array = [1, 0, 1]; sort($array); var_dump($array);
Standard input is empty
array(3) { [0]=> int(0) [1]=> int(1) [2]=> int(1) }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!