3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'id93294' => [ 'Name' => 'Tom Anderson 2', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Matrix' ], 'id29349' => [ 'Name' => 'Tom Anderson 1', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Matrix' ], 'id29348' => [ 'Name' => 'Neo', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Real World' ], 'id29346' => [ 'Name' => 'Neo', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'Zion' ], 'id29338' => [ 'Name' => 'Tank', 'Birthday' => '04/20/1973', 'Hometown' => 'Zion', 'CurrentLocation' => 'Zion' ], 'id29342' => [ 'Name' => 'Trinity', 'Birthday' => '08/09/1979', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Real World' ] ]; uasort($array, function($a, $b) { return [strtotime($a['Birthday']), $a['Hometown'] !== $a['CurrentLocation'], $a['Name']] <=> [strtotime($b['Birthday']), $b['Hometown'] !== $b['CurrentLocation'], $b['Name']]; }); var_export($array);
Output for 7.1.26 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
array ( 'id29338' => array ( 'Name' => 'Tank', 'Birthday' => '04/20/1973', 'Hometown' => 'Zion', 'CurrentLocation' => 'Zion', ), 'id29349' => array ( 'Name' => 'Tom Anderson 1', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Matrix', ), 'id93294' => array ( 'Name' => 'Tom Anderson 2', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Matrix', ), 'id29348' => array ( 'Name' => 'Neo', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Real World', ), 'id29346' => array ( 'Name' => 'Neo', 'Birthday' => '03/17/1975', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'Zion', ), 'id29342' => array ( 'Name' => 'Trinity', 'Birthday' => '08/09/1979', 'Hometown' => 'The Matrix', 'CurrentLocation' => 'The Real World', ), )
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
183.82 ms | 408 KiB | 5 Q