3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale (LC_ALL, 'pt_BR'); // Try to create the datetime instance if ($date=DateTime::createFromFormat("d-M-y ",strftime("%d-%b-%y","09-mai-17"))){ echo date_format($date,"Y/m/d"); } else { // It failed! Errors found, let's figure out what! echo "<pre>"; print_r(date_get_last_errors()); echo "</pre>"; }
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Deprecated: Function strftime() is deprecated in /in/1feUQ on line 5 Fatal error: Uncaught TypeError: strftime(): Argument #2 ($timestamp) must be of type ?int, string given in /in/1feUQ:5 Stack trace: #0 /in/1feUQ(5): strftime('%d-%b-%y', '09-mai-17') #1 {main} thrown in /in/1feUQ on line 5
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 Deprecated: Function strftime() is deprecated in /in/1feUQ on line 5 Fatal error: Uncaught TypeError: strftime(): Argument #2 ($timestamp) must be of type ?int, string given in /in/1feUQ:5 Stack trace: #0 /in/1feUQ(5): strftime('%d-%b-%y', '09-mai-17') #1 {main} thrown in /in/1feUQ on line 5
Process exited with code 255.
Output for 8.0.0 - 8.0.30
Fatal error: Uncaught TypeError: strftime(): Argument #2 ($timestamp) must be of type ?int, string given in /in/1feUQ:5 Stack trace: #0 /in/1feUQ(5): strftime('%d-%b-%y', '09-mai-17') #1 {main} thrown in /in/1feUQ on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Notice: A non well formed numeric value encountered in /in/1feUQ on line 5 <pre>Array ( [warning_count] => 0 [warnings] => Array ( ) [error_count] => 1 [errors] => Array ( [9] => Data missing ) ) </pre>
Output for 7.3.32 - 7.3.33
<pre>Array ( [warning_count] => 0 [warnings] => Array ( ) [error_count] => 1 [errors] => Array ( [9] => Data missing ) ) </pre>

preferences:
201.97 ms | 402 KiB | 214 Q