Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Latest commit

 

History

History
57 lines (36 loc) · 990 Bytes

reflect.md

File metadata and controls

57 lines (36 loc) · 990 Bytes

Documentation & Reflection

Read documentation

You can easily read the documentation from any class or function.

Let's take for instance the following function:

<?php

// test.php

namespace DummyNamespace;

/**
 * This is some PHPDoc.
 *
 * Put anything here.
 *
 * @unknownMarkup
 *
 * @param int   $x
 * @param array $y
 *
 * @return \DateTime
 *
 * @author Théo FIDRY <[email protected]>
 */
function display($x = 1, array $y = null)
{
}

The doc command easily show the documentation for the DummyNamespace\display() function:

Use case #5

You can also display the doc of PHP functions, example: doc array_map

Reflect like a boss

Reflect thanks to the ls -la function:

Use case #51

View source code

Show the source code of a function with the show command:

Use case #52

« PsySH as a debuggerPsySH for breakpoints »