Skip to content

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 <theo.fidry@gmail.com>
 */
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 »