3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a () { function b() { echo "I am b.\n"; } echo "I am a.\n"; } echo function_exists("b") ? "b is defined\n" : "b is not defined"; a(); echo function_exists("b") ? "b is defined\n" : "b is not defined"; b();

preferences:
39.9 ms | 402 KiB | 5 Q