3v4l.org

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

preferences:
49.41 ms | 402 KiB | 5 Q