<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Php on Brian Faust</title><link>https://wimdy.works/tags/php/</link><description>Recent content in Php on Brian Faust</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate><atom:link href="https://wimdy.works/tags/php/rss.xml" rel="self" type="application/rss+xml"/><item><title>Testing the Go Port Against PHP</title><link>https://wimdy.works/thoughts/make-cross-language-checks-explain-their-differences/</link><pubDate>Fri, 23 Oct 2026 00:00:00 +0000</pubDate><guid>https://wimdy.works/thoughts/make-cross-language-checks-explain-their-differences/</guid><description>&lt;p&gt;A Go function can return the same failure code as the PHP function and still
behave differently in the application. Laravel might replace the exception
before the PHP resolver sees it. A database reader might fail while loading a
relationship that a direct unit test supplied as an already populated struct.
Neither difference appears in a test which compares only the final price.&lt;/p&gt;
&lt;p&gt;The rating engine&amp;rsquo;s migration checks therefore needed more than translated
assertions. They needed executable observations from PHP, a clear point at
which to compare them with Go, and enough detail to explain a disagreement.
Otherwise, “the implementations match” could mean little more than “both tests
contain the same assumption.”&lt;/p&gt;</description></item><item><title>A PHP Test File Isn't One Migration Case</title><link>https://wimdy.works/thoughts/a-php-test-file-isnt-one-migration-case/</link><pubDate>Tue, 01 Sep 2026 00:00:00 +0000</pubDate><guid>https://wimdy.works/thoughts/a-php-test-file-isnt-one-migration-case/</guid><description>&lt;p&gt;One PHP file contained two test bodies and eleven migration cases. Counting
it as one file would hide ten of them. Counting its two &lt;code&gt;it(...)&lt;/code&gt; declarations
would still miss most of the work. Copying the first assertion into a Go test
would look plausible and preserve almost nothing of the original matrix.&lt;/p&gt;
&lt;p&gt;The file covered customer lifecycle states in the pricing application. One
body tested eight transitions; another tested three sets of state predicates.
It was small enough to follow completely, which makes it a useful way into
the much larger problem: using an existing PHP suite to constrain a Go port
without pretending that translating test syntax proves equivalent behavior.&lt;/p&gt;</description></item></channel></rss>