Output of the "Ordering a PHP array of objects by a given property" PHP snippet

Environment:

  • Strangebuzz Snippet VM: 6.4.9
  • PHP: 8.3

Code execution output:

array(4) {
  [0]=>
  object(App\Samples\SortableObject)#1924 (1) {
    ["name"]=>
    string(4) "blue"
  }
  [1]=>
  object(App\Samples\SortableObject)#1921 (1) {
    ["name"]=>
    string(5) "green"
  }
  [2]=>
  object(App\Samples\SortableObject)#1923 (1) {
    ["name"]=>
    string(6) "orange"
  }
  [3]=>
  object(App\Samples\SortableObject)#1922 (1) {
    ["name"]=>
    string(6) "yellow"
  }
}
array(4) {
  [0]=>
  object(App\Samples\SortableObject)#1923 (1) {
    ["name"]=>
    string(6) "orange"
  }
  [1]=>
  object(App\Samples\SortableObject)#1921 (1) {
    ["name"]=>
    string(5) "green"
  }
  [2]=>
  object(App\Samples\SortableObject)#1922 (1) {
    ["name"]=>
    string(6) "yellow"
  }
  [3]=>
  object(App\Samples\SortableObject)#1924 (1) {
    ["name"]=>
    string(4) "blue"
  }
}
array(4) {
  [0]=>
  object(App\Samples\SortableObject)#1924 (1) {
    ["name"]=>
    string(4) "blue"
  }
  [1]=>
  object(App\Samples\SortableObject)#1921 (1) {
    ["name"]=>
    string(5) "green"
  }
  [2]=>
  object(App\Samples\SortableObject)#1923 (1) {
    ["name"]=>
    string(6) "orange"
  }
  [3]=>
  object(App\Samples\SortableObject)#1922 (1) {
    ["name"]=>
    string(6) "yellow"
  }
}