Skip to content

Latest commit

 

History

History
143 lines (130 loc) · 7.31 KB

File metadata and controls

143 lines (130 loc) · 7.31 KB

Phargo — Progress

Auto-generated by cargo run. The whole point of this project is to watch this number climb, in public.

Scoreboard

.phpt pass rate: 4027 / 22037 (18.27% of the entire PHP test suite)

This counts only the upstream php-src test suite — tests we did not write. Among tests the runner can currently grade (21970): 18.33%. The 67 "not-yet-gradeable" tests have no --EXPECT--/--EXPECTF-- (e.g. --EXPECTREGEX-- or output-less).

✓ pass ✗ fail • not-yet-gradeable total
4027 17943 67 22037

Curated smoke tests (dev guards, not in the number above): 88/93 passing.

By area

area ✓ pass total %
Zend 1471 5336 27.6%
ext/standard 952 3919 24.3%
ext/opcache 478 925 51.7%
ext/dom 64 870 7.4%
core 268 869 30.8%
ext/spl 157 805 19.5%
ext/date 197 689 28.6%
ext/soap 0 597 0.0%
ext/phar 13 576 2.3%
ext/reflection 75 521 14.4%
ext/intl 2 506 0.4%
ext/mysqli 1 452 0.2%
ext/mbstring 36 420 8.6%
ext/uri 0 374 0.0%
ext/gd 0 319 0.0%
ext/session 35 269 13.0%
ext/openssl 1 262 0.4%
ext/curl 0 176 0.0%
ext/bcmath 82 168 48.8%
ext/pcre 58 168 34.5%
ext/pdo_mysql 2 167 1.2%
ext/zend_test 4 161 2.5%
ext/zlib 11 157 7.0%
ext/simplexml 27 156 17.3%
ext/ldap 0 141 0.0%
sapi/fpm 0 141 0.0%
ext/sockets 0 128 0.0%
ext/pdo 1 127 0.8%
ext/zip 2 122 1.6%
ext/filter 19 121 15.7%
sapi/cli 2 114 1.8%
ext/ffi 0 105 0.0%
ext/pgsql 0 102 0.0%
ext/gmp 0 101 0.0%
ext/exif 5 100 5.0%
ext/json 19 100 19.0%
ext/sqlite3 0 98 0.0%
ext/pdo_sqlite 8 87 9.2%
ext/xsl 0 81 0.0%
ext/hash 3 80 3.8%
ext/iconv 2 77 2.6%
sapi/phpdbg 0 70 0.0%
ext/random 4 69 5.8%
ext/pdo_pgsql 0 68 0.0%
ext/xml 3 67 4.5%
ext/fileinfo 0 63 0.0%
ext/pcntl 0 62 0.0%
ext/posix 0 62 0.0%
ext/dba 0 60 0.0%
ext/ftp 0 59 0.0%
ext/xmlreader 5 56 8.9%
ext/calendar 0 53 0.0%
ext/tokenizer 0 53 0.0%
ext/xmlwriter 0 51 0.0%
ext/odbc 0 50 0.0%
ext/tidy 2 50 4.0%
ext/ctype 10 49 20.4%
ext/pdo_firebird 0 49 0.0%
ext/com_dotnet 0 41 0.0%
ext/snmp 0 39 0.0%
ext/sodium 1 39 2.6%
ext/enchant 0 33 0.0%
ext/libxml 0 32 0.0%
ext/pdo_dblib 0 31 0.0%
ext/bz2 2 27 7.4%
ext/readline 0 26 0.0%
sapi/cgi 4 24 16.7%
ext/gettext 0 19 0.0%
ext/pdo_odbc 0 17 0.0%
ext/sysvshm 0 13 0.0%
ext/sysvmsg 0 7 0.0%
ext/shmop 0 6 0.0%
ext/skeleton 1 3 33.3%
ext/sysvsem 0 2 0.0%

Roadmap (the climb)

The ladder to "WordPress boots in the browser". Each rung is measured against real php-src tests.

  • v0–v3b — Core language. Inline HTML/echo, the zval value model + "$var" interpolation, the full operator/precedence/type-juggling engine, if/while/do/for/foreach/switch, break/continue, ++/--, assignment-as-expression (incl. compound), comments.
  • v4 — Functions. Built-in calls (var_dump/is_*/string+math) and user functions (params/defaults/return/recursion/scope).
  • v5 — Arrays. Ordered-map arrays, [...]/array() literals, index r/w/append, foreach, and the core array/string builtins.
  • v6 — Ternary ?: / null-coalescing ?? + sprintf/substr/str_replace.
  • v8 — Classes. class/interface/trait, properties, methods, $this, new, ->, __construct, single inheritance + polymorphic dispatch.
  • v9 — isset / empty / unset.
  • v10 — :: + __toString. Class constants, self::/parent::/Class::, ::class.
  • v11 — Exceptions + instanceof. throw/try/catch/finally, the Exception/Error/SPL hierarchy.
  • v12 — Callables + higher-order builtins. array_map/array_filter/array_reduce, call_user_func(_array), array_search/array_slice/…
  • v13 — Closures. function(...) use(...) {} (by-value capture) + arrow fn(...) => expr.
  • v14 — JSON. json_encode / json_decode.
  • v15 — By-reference array fns. sort family + array_push/array_pop/array_shift/array_unshift.
  • v16–v20 — More builtins + language. array_* / ctype_*, match, static class properties, strtr, compact, levenshtein, …
  • v21 — Heredoc / nowdoc.
  • v22 — Array destructuring. [$a, $b] = … / list(...), skipped slots + nesting.
  • v23–v24 — Hashing / encoding. md5/sha1/crc32/base64/bin2hex, hash() dispatcher (from-scratch algorithms).
  • v25 — Regex engine. From-scratch backtracking VM: preg_match/preg_match_all/preg_replace/preg_replace_callback/preg_split/preg_quote.
  • v26 — Type casts ((int)/(string)/…) + PHP leading-numeric string coercion.
  • v27 — @ error-suppression + full numeric literals (hex/bin/oct/_ separators).
  • v28 — Traits, constructor promotion, #[attributes], robust class bodies.
  • v29 — User constants, print/clone, declare/namespace, output buffering (ob_*), setup stubs.
  • v30 — ~70 predefined constants (DIRECTORY_SEPARATOR/SORT_*/ENT_*/FILTER_*/…).
  • v31 — include / require / eval with real file loading (and real __FILE__/__DIR__).
  • v32 — Filesystem + path fns. file_put_contents/file_get_contents/scandir/mkdir/basename/dirname/pathinfo/…
  • v33 — serialize / unserialize.
  • v34 — Enums (pure + backed: ::cases/from/tryFrom) + postfix chaining on expressions.
  • v35 — File streams. fopen family (fread/fwrite/fgets/fgetcsv/…) + STDIN/STDOUT/STDERR.
  • v36 — mbstring (UTF-8 basics: mb_strlen/mb_substr/mb_*).
  • v37 — More standard functions. strstr/fdiv/filter_var/array_walk/class_alias/wordwrap/…
  • v38 — foreach over Iterator/IteratorAggregate + post-inc/dec on property/index lvalues.

🎯 North star — WordPress boots in the browser

  • pcre (regex) + mbstring (Unicode) basics.
  • SPLArrayObject/ArrayIterator/SplStack/SplQueue/… via ArrayAccess + the iterator support.
  • Date/timedate() / mktime() / strtotime() / DateTime.
  • Reflection.
  • Request lifecycle — superglobals, the Playground host interface.
  • pdo_sqlite — WordPress-in-Playground runs on SQLite, not MySQL.
  • WordPress boots in the browser — compiled to WASM, smaller than the Emscripten build.

Runner TODO

  • --EXPECTF-- matcher (hand-rolled; makes ~8k more tests gradeable)
  • honor --SKIPIF-- / --EXTENSIONS--
  • verify curated smoke tests against a reference PHP (Docker php:8.3-cli)