phibble

CSV conformance

Verification

Scope

Names, problem counts, and column values of the PHP CSV reader for 120 corpus cases, through the Phit\read_csv() contract. Identical results at block sizes from 1 to 64 rows.

References

Versions
PHP 8.5.10

Data

CSV conformance corpus
120 cases: delimiters, quoting, comments, blank lines, encodings, NA strings, type guessing, and declared types Source

Method

bin/generate-csv-conformance writes the PHP reader's results to the corpus. phit holds a byte-identical copy and checks its native reader against it. The CSV reading record compares these results with readr.

Check
Expected values and invariants of the package
Recorded
2026-11-02, PHP 8.5.10, macOS 27.0.1 (arm64), commit 1abdeb1

Tolerances

exact equality

Applies to: Names, problem counts, column values, and types

x: package value; r: reference value.

Results

127 comparisons: 127 pass, 0 fail, 0 skipped.

All 127 comparisons
Every comparison
Case Quantity Status
is generated from the cases the generator declares pass
option/delimiter/default pass
option/delimiter/semicolon pass
option/quote/default pass
option/quote/apostrophe pass
option/escape_double/default pass
option/escape_double/off pass
option/escape_backslash/default pass
option/escape_backslash/on pass
option/trim_ws/default pass
option/trim_ws/off pass
option/skip_empty_rows/default pass
option/skip_empty_rows/off pass
option/col_names/default pass
option/col_names/off pass
option/skip/default pass
option/skip/two pass
option/guess_max/default pass
option/guess_max/two pass
option/n_max/default pass
option/n_max/two pass
option/comment/default pass
option/comment/hash pass
option/decimal_mark/default pass
option/decimal_mark/comma pass
option/grouping_mark/default pass
option/grouping_mark/none pass
option/na/default pass
option/na/dash pass
option/types/default pass
option/types/string-and-int pass
type/guess pass
type/logical pass
type/integer pass
type/double pass
type/character pass
type/date pass
type/datetime pass
type/skip pass
type/by-position pass
type/past-the-end pass
type/parse-failures pass
structure/ragged-short pass
structure/ragged-long pass
structure/ragged-both-and-empty pass
structure/bom pass
structure/crlf pass
structure/cr pass
structure/no-trailing-newline pass
structure/empty-file pass
structure/only-empty-lines pass
structure/embedded-newline pass
structure/no-quote-character pass
structure/duplicate-names pass
structure/empty-name pass
structure/single-cell pass
structure/tab-delimited pass
structure/skip-past-the-end pass
structure/whitespace-only-fields pass
structure/comment-line pass
structure/value-then-comment pass
structure/comment-in-header pass
structure/invalid-utf8 pass
structure/unterminated-quote pass
structure/unterminated-quote-only-field pass
quotes/backslash-quoted-word pass
quotes/stray-pair pass
quotes/stray-pair-hides-delimiter pass
quotes/backslash-before-delimiter pass
quotes/doubled pass
quotes/in-unquoted-field pass
quotes/text-after-closing-quote pass
quotes/doubled-then-stray pass
quotes/stray-newline-ends-record pass
quotes/space-before-quote pass
quotes/doubled-reopens pass
quotes/escape-double-off pass
zero-rows/header-only pass
zero-rows/n-max-zero pass
zero-rows/every-row-skipped pass
zero-rows/every-row-empty pass
zero-rows/header-only-typed pass
zero-rows/all-na-with-a-data-row pass
zero-rows/empty-rows-kept pass
blank/quoted-empty-only-field pass
blank/quoted-empty-then-value pass
blank/quoted-empty-mid-file pass
blank/quoted-empty-rows-kept pass
blank/quoted-space-is-data pass
blank/whitespace-only-line pass
blank/whitespace-only-line-untrimmed pass
blank/whitespace-only-line-kept pass
blank/tab-only-line-untrimmed pass
blank/whitespace-only-file pass
blank/whitespace-only-file-unterminated pass
blank/unterminated-whitespace-last-line pass
blank/whitespace-is-the-delimiter pass
blank/whitespace-is-the-delimiter-kept pass
blank/crlf-whitespace-line pass
blank/cr-whitespace-line pass
blank/comment-after-whitespace-leading pass
blank/comment-after-whitespace-mid-file pass
values/bool-spellings pass
values/int-and-float pass
values/negative-zero-and-exponents pass
values/inf-and-nan pass
values/int64-edges pass
values/int-overflow pass
values/leading-zeroes-are-strings pass
values/mixed-forces-string pass
values/all-na-column pass
values/dates pass
values/datetimes pass
values/datetime-offsets pass
values/pre-epoch-temporals pass
values/quoted-numbers-stay-numbers pass
values/quote-inside-unquoted-field pass
values/guess-max-sampling pass
values/na-overrides-the-guess pass
values/empty-na-list pass
values/grouped-numbers pass
block size 1 all 120 cases pass
block size 2 all 120 cases pass
block size 3 all 120 cases pass
block size 5 all 120 cases pass
block size 8 all 120 cases pass
block size 64 all 120 cases pass

Reproduction

From the repository root
bin/generate-csv-conformance
php vendor/bin/pest tests/CsvConformanceTest.php
Raw record
site/verifications/csv-conformance.json
Input data
tests/fixtures/csv-conformance.json