@NikiC given you were behind PHP 7's engine exceptions, does this feature request to have require() use them sound reasonable? it'd be trivial to implement I assume, I'd do it myself. do you think it would need an RFC to get into 7.3 or so?
I'm learning the concept of Cookies in PHP from this link
Till now I've understood that
A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. Wi...
@DaveRandom you are not wrong about changing ctor signature. depends on how you see it... in languages that have first class citizens classes also ctors must follow lsp, because the "class" objects likely have a method that is supposed to be compatible with super classes' ones
e.g. class A{ function __construct(int $a){} } class B extends A{ function __construct(stdClass $a){} } (new ReflectionClass("A"))->newInstance() is incompatible with (new ReflectionClass("B"))->newInstance()
new user asking gibberish. getting perfect english answer by another new user. I smell sock puppets and plagiarism. will flag in case you are slacking today
@WesStark yeh but that way madness lies, to me reflection is a sign that you did something wrong somewhere already, i.e. it's a tool for fixing problematic code, not for writing code with
except for stuff like DI containers, which should be making zero assumptions anyway
i.e they should be 100% dynamic and not assume any particular type to be magically compatible with any other type unless it is explicitly declared to be via explicit configuration by the consumer
ctors are explicitly exempt from LSP, in PHP anyway (and many other languages) and they should stay that way
@DaveRandom for github.com/DaveRandom/LibDNS/issues/15 the guy does kind of have a point. Would moving that function to be a static method on a class be acceptable?
> Admittedly, I am not an expert programmer. Please be tolerant if I use the wrong terminology. I need to migrate PHP code from PHP 4 to 7. I diligently added 'i' to all the database calls (e.g. myslq_connect became mysqli_connect). In the code below, the connection is done in the class constructor (it wasn't used in the PHP 4 compatible code).
World Elephant Day is an international annual event on August 12, dedicated to the preservation and protection of the world's elephants. Conceived in 2011 by Canadian filmmakers Patricia Sims and Michael Clark of Canazwest Pictures, and Sivaporn Dardarananda, Secretary-General of the Elephant Reintroduction Foundation in Thailand, it was officially founded, supported and launched by Patricia Sims and the Elephant Reintroduction Foundation on August 12, 2012. Since that time, Patricia Sims continues to lead and direct World Elephant Day, which is now supported by over 65 wildlife organizations and...
if you are modeling hardware i've used inventor for a while. it's probably the simplest to use as parts are already modeled. like you can pick screws, gears, etc