3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace App; function z(): int { return 1; } function ok(): int { return namespace\z(); } function bad(): void { namespace\nope(); // ^^^^^^^^^^^^^^^^ UndefinedFunction: Function namespace\nope() is not defined // ^^^^^^^^^^^^^^^^ UndefinedFunction: Function App\nope() is not defined } bad();
Output for 8.2.0 - 8.2.34, 8.3.0 - 8.3.35, 8.4.1 - 8.4.26, 8.5.0 - 8.5.11
Fatal error: Uncaught Error: Call to undefined function App\nope() in /in/uWFHs:10 Stack trace: #0 /in/uWFHs(15): App\bad() #1 {main} thrown in /in/uWFHs on line 10
Process exited with code 255.

preferences:
33.02 ms | 1152 KiB | 7 Q