3v4l.org

run code in 300+ PHP versions simultaneously
<?php function r(){ return rand(1,10); } if(empty(r())){ echo 'web'; }else{ echo 'lol'; }

preferences:
40.59 ms | 404 KiB | 5 Q