3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sort = array(); //並び替え $matome = array(1 =>ACa,2 =>Baa ,3 =>Aaa ); foreach((array) $matome as $key => $value) { $sort[$key] = $value; } array_multisort($sort , SORT_ASC, SORT_STRING | SORT_FLAG_CASE, $matome); print_r($matome);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Undefined constant "ACa" in /in/JOjiS:5 Stack trace: #0 {main} thrown in /in/JOjiS on line 5
Process exited with code 255.
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: Use of undefined constant ACa - assumed 'ACa' (this will throw an Error in a future version of PHP) in /in/JOjiS on line 5 Warning: Use of undefined constant Baa - assumed 'Baa' (this will throw an Error in a future version of PHP) in /in/JOjiS on line 5 Warning: Use of undefined constant Aaa - assumed 'Aaa' (this will throw an Error in a future version of PHP) in /in/JOjiS on line 5 Array ( [0] => Aaa [1] => ACa [2] => Baa )
Output for 7.1.0 - 7.1.33
Notice: Use of undefined constant ACa - assumed 'ACa' in /in/JOjiS on line 5 Notice: Use of undefined constant Baa - assumed 'Baa' in /in/JOjiS on line 5 Notice: Use of undefined constant Aaa - assumed 'Aaa' in /in/JOjiS on line 5 Array ( [0] => Aaa [1] => ACa [2] => Baa )

preferences:
212.55 ms | 402 KiB | 225 Q