3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=array("14-10-2013","15-10-2013","16-10-2013","13-11-2013","17-11-2013","18-10-2013","19-10-2013"); asort(strtotime($a)); print_r($a);
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.7
Fatal error: Uncaught TypeError: strtotime(): Argument #1 ($datetime) must be of type string, array given in /in/CuK7L:4 Stack trace: #0 /in/CuK7L(4): strtotime(Array) #1 {main} thrown in /in/CuK7L on line 4
Process exited with code 255.
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
Warning: strtotime() expects parameter 1 to be string, array given in /in/CuK7L on line 4 Notice: Only variables should be passed by reference in /in/CuK7L on line 4 Warning: asort() expects parameter 1 to be array, bool given in /in/CuK7L on line 4 Array ( [0] => 14-10-2013 [1] => 15-10-2013 [2] => 16-10-2013 [3] => 13-11-2013 [4] => 17-11-2013 [5] => 18-10-2013 [6] => 19-10-2013 )
Output for 7.3.32 - 7.3.33, 7.4.26
Warning: strtotime() expects parameter 1 to be string, array given in /in/CuK7L on line 4 Warning: asort() expects parameter 1 to be array, bool given in /in/CuK7L on line 4 Array ( [0] => 14-10-2013 [1] => 15-10-2013 [2] => 16-10-2013 [3] => 13-11-2013 [4] => 17-11-2013 [5] => 18-10-2013 [6] => 19-10-2013 )
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33
Warning: strtotime() expects parameter 1 to be string, array given in /in/CuK7L on line 4 Notice: Only variables should be passed by reference in /in/CuK7L on line 4 Warning: asort() expects parameter 1 to be array, boolean given in /in/CuK7L on line 4 Array ( [0] => 14-10-2013 [1] => 15-10-2013 [2] => 16-10-2013 [3] => 13-11-2013 [4] => 17-11-2013 [5] => 18-10-2013 [6] => 19-10-2013 )
Output for 5.2.1 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
Warning: strtotime() expects parameter 1 to be string, array given in /in/CuK7L on line 4 Strict Standards: Only variables should be passed by reference in /in/CuK7L on line 4 Warning: asort() expects parameter 1 to be array, boolean given in /in/CuK7L on line 4 Array ( [0] => 14-10-2013 [1] => 15-10-2013 [2] => 16-10-2013 [3] => 13-11-2013 [4] => 17-11-2013 [5] => 18-10-2013 [6] => 19-10-2013 )
Output for 5.1.0 - 5.1.6, 5.2.0
Strict Standards: Only variables should be passed by reference in /in/CuK7L on line 4 Warning: asort() expects parameter 1 to be array, boolean given in /in/CuK7L on line 4 Array ( [0] => 14-10-2013 [1] => 15-10-2013 [2] => 16-10-2013 [3] => 13-11-2013 [4] => 17-11-2013 [5] => 18-10-2013 [6] => 19-10-2013 )
Output for 5.0.5
Notice: Array to string conversion in /in/CuK7L on line 4 Fatal error: Only variables can be passed by reference in /in/CuK7L on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.4
Notice: Array to string conversion in /in/CuK7L on line 4 Warning: asort() expects parameter 1 to be array, integer given in /in/CuK7L on line 4 Array ( [0] => 14-10-2013 [1] => 15-10-2013 [2] => 16-10-2013 [3] => 13-11-2013 [4] => 17-11-2013 [5] => 18-10-2013 [6] => 19-10-2013 )

preferences:
234.51 ms | 403 KiB | 400 Q