Hot code reloading!!?!?1?
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!
What gets reloaded
- Method bodies (including private/protected)
- Function implementations (and new functions!)
- Class and global constants
What can't be reloaded
- New class methods
- Class properties, inheritance, or interfaces
- Method signatures
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.
Bug fixes
- Fix "array offset on null" warning on
Ctrl-C— plays nicer with Laravel + PHP 8.5 - Work around O(n²) performance in Symfony OutputFormatter