3v4l.org

run code in 300+ PHP versions simultaneously
<?php $format = [new Datetime('2025-01-30'), 'format']; echo call_user_func($format, 'd/m/Y');
Output for 8.1.32, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
30/01/2025
Output for 4.3.0
Parse error: parse error, unexpected '[' in /in/Fi9Ma on line 2
Process exited with code 255.

preferences:
41.57 ms | 406 KiB | 5 Q