I've never seen this type of scenario in PHP. Most of the PHP examples and tutorial use the format of function calling after the declaration, but here i tried it for the first time.I think PHP use interpreter and read the code line by line. should not it generate an error in line 3 when it has not detect any function declaration before line 3?
<?php
$m=new m;
echo $m->abd(17,18);
class m
{
function abd($a,$b)
{
return($a+$b);
}
}
?>
But Output was
35
is this Possible? For reference this is the Sandbox Link you can try this code
</div>