3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rand = rand(0,1); var_dump($rand); foo(); bar(); if ($rand) { function foo() { echo bar();} function bar() { return 'bar';} }

preferences:
34.81 ms | 402 KiB | 5 Q