NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #91 most downloaded on Packagist
An interactive shell for modern PHP.
Last release 3 months ago
29 Jun 2026
Ships fairly regularly
a new release about every 4 weeks
Rarely documented
notes for 10 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
126 releases · first in 2014
Avoid deprecated reflection calls on PHP 8.4+
The pure-PHP experimental readline implementation now has its own built-in pager. Long output opens in an alternate-screen pager with keyboard and mouse scrolling, search, wrap-aware layout, and sensible scrollback behavior after exit.
This is specific to PsySH's experimental userland readline, and it's another reason to give it a try:
psysh --experimental-readlineOr enable it in config:
'useExperimentalReadline' => true,The built-in pager is enabled automatically with experimental readline, or explicitly with 'pager' => true.
We'd love your feedback! Try it out and let us know what works, what doesn't, and what still feels weird.
doc understands more PHP manual targets directly, including structured manual page IDs like language.types.array, language type/operator pages, and language constructs like array and list. Addresses #937 (thanks @Tomirad!)
Manual output also got a big upgrade: variadic signatures make more sense; structured text, tables, and code blocks now render properly; PHP snippets get syntax highlighting; and wrapping works better across styled and wide-character output.
history --session to show, save, or replay only commands from the current REPL sessionhistory --clear now rejects filters and range options instead of accepting combinations it ignorestimeit median calculationsudo instantiation for classes without constructorsghOne column per quarter.
Fix interactive readline bracket matching inside interpolated strings. Fixes #930
ShellOutput write tracking (e.g. print_r on an Exception with zend.exception_ignore_args = Off). Fixes #934--warm-autoload in project trust restrictionsThe old format is available via useDeprecatedMultilineStrings until the next major release.
PsySH has a new config command for inspecting and updating runtime-configurable settings during the current session. You can tweak things like pager, theme, verbosity, useSuggestions, useSyntaxHighlighting, clipboardCommand, and semicolonsSuppressReturn without restarting the shell. Fixes #361
There’s also a new copy command for copying the last result ($_) or any expression to your clipboard. Works with system clipboard commands, or via OSC 52 for SSH and remote terminals.
Configure with clipboardCommand or useOsc52Clipboard in your config.
Optionally suppress return values by ending a statement with ;, similar to MATLAB/Octave behavior. Supports a 'double' mode requiring ;; for suppression (if requireSemicolons is also enabled, both true and 'double' require ;;).
'semicolonsSuppressReturn' => true,
'semicolonsSuppressReturn' => 'double', // Always require ;; to suppressStrings are now valid PHP!
""". The old format is available via useDeprecatedMultilineStrings until the next major release.Providing an exceptionDetails callback via config renders additional context about exceptions (e.g. validation errors) alongside the error message. Fixes #648
A few other improvements:
help layout adapts to terminal width.Legacy readline now shares PsySH’s newer completion engine, which brings much better parity between ext-readline/libedit and experimental interactive readline. Command argument completion, better multiline buffering, and a handful of command-dispatch edge cases now work much more consistently outside experimental readline too.
Commands can now define their own argument completions via CommandArgumentCompletionAware.
New in the experimental interactive readline:
useSyntaxHighlighting if you don't like colors, I guess.psy\info() and --info also report more detail about readline and autocomplete state.
Run psysh with --experimental-readline and try it out. It's getting kind of awesome!
Bare config and copy at the prompt now resolve to PsySH commands before PHP function calls. Prefix ambiguous input with ; to force PHP execution.
use function and use const statements.throw new Exception in PHP 7.4--pager / --no-pager CLI optionspsy\info() / --info output with interactive completionedit command instead of waiting for the editor to closeAdded an experimental interactive readline: a from-scratch pure-PHP readline replacement built specifically for PsySH. Instead of delegating to ext-re
Added an experimental interactive readline: a from-scratch pure-PHP readline replacement built specifically for PsySH. Instead of delegating to ext-readline or ext-libedit, this gives PsySH full control over input, editing, completion, and rendering.
This is opt-in and experimental. Default behavior is completely unchanged. Enable it in your config or from the command line:
'useExperimentalReadline' => true,psysh --experimental-readlineSee the interactive readline wiki page for more!
The new completion engine is syntax-aware, type-aware, and runtime-value-aware. It parses your input, resolves types from live objects in scope, and completes based on what your code actually is, not just string matching on symbol names.
Type $user-> and see that object's actual methods and properties. Chain through $repo->find(1)-> and get completions for the return type. Fuzzy matching means asum finds array_sum and stl finds strtolower. Completions show in a navigable multi-column menu.
Press Enter on an incomplete statement and the input continues on the next line with proper indentation. Closing brackets auto-dedent. Shift+Enter always inserts a newline. No more fighting the shell to write a multi-line closure.
'useSuggestions' => true.ext-readline or ext-libedit required. Works with any terminal.This addresses a bunch of long-standing issues: #234, #254, #309, #346, #506, #561, #668, #732, #769, #869.
We'd love your feedback! Give it a try, and let us know what works and what doesn't. The goal is to make this the default. Help us get it there. 🧪
Fixed several edge cases with the Restricted Mode introduced in v0.12.19 where non-interactive contexts (piped input, execute() calls, Composer proxy
Fixed several edge cases with the Restricted Mode introduced in v0.12.19 where non-interactive contexts (piped input, execute() calls, Composer proxy scripts) could incorrectly trigger trust prompts or restrict trusted functionality.
Fixes #913
Decoupled commands from ShellOutput via a new ShellOutputAdapter, so commands degrade gracefully when used in non-interactive contexts rather than failing on missing shell features.
bin/ to scripts/Fixed a CWD configuration poisoning vulnerability ( CVE-2026-25129 ) where a malicious .psysh.php file in an attacker-writable directory could execute…
Fixed a CWD configuration poisoning vulnerability (CVE-2026-25129) where a malicious .psysh.php file in an attacker-writable directory could execute arbitrary code when a victim runs PsySH from that directory. This affects all versions prior to v0.12.19 and v0.11.23, including downstream consumers like Laravel Tinker, when invoked from an attacker-writable CWD.
Fixed in v0.12.19 and v0.11.23. Upgrade ASAP.
PsySH now requires explicit trust before loading project-local config (.psysh.php), local PsySH binaries, or Composer autoloads from untrusted projects. Trust decisions are persisted per-project in trusted_projects.json.
Configure with trustProject:
'trustProject' => 'prompt', // default — ask interactively
'trustProject' => 'always', // trust all projects
'trustProject' => 'never', // always run restrictedOr use --trust-project / --no-trust-project CLI flags, or the PSYSH_TRUST_PROJECT env var.
Non-interactive sessions automatically skip untrusted features with a warning.
Tab completion, ls, doc, and show commands now recognize @method and @property docblock tags. Magic members display in magenta so you can tell them apart from real methods and properties.
Inheritance works as expected — magic members from parent classes, interfaces, and traits are included, with child declarations taking precedence.
Also fixes parsing of generic types (e.g., array<int, string>) in docblock tags, which previously broke on whitespace inside angle brackets.
See #905
--cwd to actually change the working directory. Previously it only affected discovery for autoload/config, so relative paths and other directory-dependent behavior didn’t work as expected inside the shell.Fix exit() not working when uopz extension is loaded
exit() not working when uopz extension is loadedCtrl-C might be incorrectly handled after exiting)Install the uopz extension (5.0+) and PsySH will automatically reload modified files during your session. Edit code, switch back to PsySH, and your ch
Install the uopz extension (5.0+) and PsySH will automatically reload modified files during your session. Edit code, switch back to PsySH, and your changes are live—no restart needed!
PsySH skips "risky" reloads by default (conditional definitions, static variables). Use the new yolo command to bypass safety checks:
>>> my_helper()
Warning: Skipped conditional: if (...) { function my_helper() ... }
>>> yolo !!
=> "result"
See the documentation for more details.
Ctrl-C — plays nicer with Laravel + PHP 8.5A quick release adding support for Symfony Console v7.4+ and v8.x.
A quick release adding support for Symfony Console v7.4+ and v8.x.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed CWD configuration poisoning vulnerability ( CVE-2026-25129 ). Backported Restricted Mode from v0.12 . PsySH now requires explicit trust before l…
.psysh.php), local PsySH binaries, or Composer autoloads from untrusted projects. Configure with trustProject config option, --trust-project / --no-trust-project CLI flags, or PSYSH_TRUST_PROJECT env var.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →