General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Lawrence D’Oliveiro
Lex Clips
comments
Comments by "Lawrence D’Oliveiro" (@lawrencedoliveiro9104) on "Lex Fridman on PHP programming" video.
Why are the scoping rules so arbitrary and capricious? Consider $var = «val»; is scoped to the current function body, but define('notvar', «val»); is always global scope, even if it occurs in a function body! Even stranger, function example_init() { class MyClass { ... } /*MyClass*/; } /*example_init*/ defines MyClass globally too! And I thought that “using” clauses is just PHP’s way of implementing lexical binding. But it turns out they’re not. Even JavaScript can figure that out.
2
Variable reference: $var Function call: func() Instance variable reference: $ins->var Instance method call: $ins->func() Why isn’t the instance variable reference “$ins->$var”? Why can’t you “identify variables quickly” in that situation?
2
Laravel doesn’t do async though, does it. Python frameworks do async with ASGI and asyncio.
1