Bu PHP dize işlev çağrısı genişletmek mümkün mü?

0 Cevap php

Ben böyle bir dizge içindeki foo() aramaya çalıştı:

echo "This is a ${foo()} car";

function foo() {
    return "blue";
}

ama, bir sözdizimi hatası ile biter.

I here ona benzer bir şey buldum, ama ben gerek yok tam olarak ne:

echo "This is the value of the var named by the return value of getName(): {${getName()}}";

Bunu yapmak mümkün mü?

0 Cevap