@halcyon Interesting client! I tried to run it but ran into a few issues on PHP 7.2. I didn't want to register on yet another website so here is a list of things I ran into:

* notabug.org/halcyon-suite/halc Assigning array values this way throws a warning and will return an error on later PHP versions.
* notabug.org/halcyon-suite/halc Does no sanity checking and will emit a notice when the response does not match expectations.
* notabug.org/halcyon-suite/halc eval asking for trouble. You don't want to do that.


@nvsr I'm back from holidays and had a look at those problems but I have questions.
- This is the standard form of assigning a value to a associative array,isn't it?In which way should I do it if not in this?Using array_push() would only make sense for numbered arrays.
- Which form of sanity checking do you think I need at this point?First checking that $response exists and is an array,then checking that for ['html'] and so on?Or do you mean something else?

@halcyon welcome home! I hope you had a great vacation.
* The prefered way to setting associative array values is $arr['foo'] = "bar"
* Checking whether the response matches what you expect should do the trick!

@nvsr I don't see a real difference between $parameters[CURLOPT_POSTFIELDS] = http_build_query($data); and $arr['foo'] = "bar";.As key I use a constant instead of a string and as a value I use a function instead of a string but both should be fine as far as I know.Can you please further explain where you locate the error?
For the second problem,I see what you mean and will do that.

@halcyon interestingly it seems that those constants were not defined when I ran the code. Oddly enough I do have curl enabled so I'll look into it some more after I get home from work.

@nvsr cURL option constants should be set by PHP automatically.You can find a list of them here: php.net/manual/en/function.cur

Sign in to participate in the conversation
W3C CSS Working Group Mastodon

Mastodon server for anyone interested in CSS or general web development