Warning: The magic method Exercise_One\Singleton::__sleep() must have public visibility in /in/Wa9Q5 on line 60
Warning: The magic method Exercise_One\Singleton::__wakeup() must have public visibility in /in/Wa9Q5 on line 65
Fatal error: Uncaught TypeError: strnatcmp(): Argument #1 ($string1) must be of type string, array given in /in/Wa9Q5:36
Stack trace:
#0 /in/Wa9Q5(36): strnatcmp(Array, Array)
#1 [internal function]: Exercise_One\{closure}(Array, Array)
#2 /in/Wa9Q5(42): uasort(Array, Object(Closure))
#3 /in/Wa9Q5(78): Exercise_One\Singleton::sortBy(Array, 'number', 'ASC', 'cat')
#4 {main}
thrown in /in/Wa9Q5 on line 36
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Warning: The magic method Exercise_One\Singleton::__sleep() must have public visibility in /in/Wa9Q5 on line 60
Warning: The magic method Exercise_One\Singleton::__wakeup() must have public visibility in /in/Wa9Q5 on line 65
Fatal error: Uncaught TypeError: strnatcmp(): Argument #1 ($string1) must be of type string, array given in /in/Wa9Q5:36
Stack trace:
#0 /in/Wa9Q5(36): strnatcmp(Array, Array)
#1 [internal function]: Exercise_One\{closure}(Array, Array)
#2 /in/Wa9Q5(42): uasort(Array, Object(Closure))
#3 /in/Wa9Q5(78): Exercise_One\Singleton::sortBy(Array, 'number', 'ASC', 'cat')
#4 {main}
thrown in /in/Wa9Q5 on line 36
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Warning: strnatcmp() expects parameter 1 to be string, array given in /in/Wa9Q5 on line 36
Notice: Trying to access array offset on value of type null in /in/Wa9Q5 on line 36
Warning: strnatcmp() expects parameter 1 to be string, array given in /in/Wa9Q5 on line 36
Notice: Trying to access array offset on value of type null in /in/Wa9Q5 on line 36
Warning: strnatcmp() expects parameter 1 to be string, array given in /in/Wa9Q5 on line 36
Notice: Trying to access array offset on value of type null in /in/Wa9Q5 on line 36
Warning: strnatcmp() expects parameter 1 to be string, array given in /in/Wa9Q5 on line 36
Notice: Trying to access array offset on value of type null in /in/Wa9Q5 on line 36
Warning: strnatcmp() expects parameter 1 to be string, array given in /in/Wa9Q5 on line 36
Notice: Trying to access array offset on value of type null in /in/Wa9Q5 on line 36
Array
(
[0] => Array
(
[id] => 1
[number] => 1
[street] => Battery St
[unit] => 1
[rent] => 1200
)
[1] => Array
(
[id] => 10
[number] => 10
[street] => Battery St
[unit] => 3
[rent] => 1800
)
[2] => Array
(
[id] => 2
[number] => 2
[street] => Leavenworth St
[unit] => 11
[rent] => 800
)
[3] => Array
(
[id] => 12
[number] => 12
[street] => Battery St
[unit] => 10
[rent] => 3400
)
[4] => Array
(
[id] => 1
[number] => 14
[street] => Leavenworth St
[unit] => 10
[rent] => 1450
)
[5] => Array
(
[id] => 1
[number] => 01
[street] => Battery St
[unit] => 5
[rent] => 1000
)
)
Warning: strnatcmp() expects parameter 1 to be string, array given in /in/Wa9Q5 on line 36
Warning: strnatcmp() expects parameter 1 to be string, array given in /in/Wa9Q5 on line 36
Warning: strnatcmp() expects parameter 1 to be string, array given in /in/Wa9Q5 on line 36
Warning: strnatcmp() expects parameter 1 to be string, array given in /in/Wa9Q5 on line 36
Warning: strnatcmp() expects parameter 1 to be string, array given in /in/Wa9Q5 on line 36
Array
(
[0] => Array
(
[id] => 1
[number] => 1
[street] => Battery St
[unit] => 1
[rent] => 1200
)
[1] => Array
(
[id] => 10
[number] => 10
[street] => Battery St
[unit] => 3
[rent] => 1800
)
[2] => Array
(
[id] => 2
[number] => 2
[street] => Leavenworth St
[unit] => 11
[rent] => 800
)
[3] => Array
(
[id] => 12
[number] => 12
[street] => Battery St
[unit] => 10
[rent] => 3400
)
[4] => Array
(
[id] => 1
[number] => 14
[street] => Leavenworth St
[unit] => 10
[rent] => 1450
)
[5] => Array
(
[id] => 1
[number] => 01
[street] => Battery St
[unit] => 5
[rent] => 1000
)
)
Output for 5.6.0 - 5.6.40
Catchable fatal error: Argument 3 passed to Exercise_One\sortLogic() must be an instance of Exercise_One\bool, string given, called in /in/Wa9Q5 on line 42 and defined in /in/Wa9Q5 on line 33
Process exited with code 255.