PHP Classes

urp: Display the values of variables in HTML pages

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 90 All time: 9,950 This week: 488Up
Version License PHP version Categories
urp 1.0.0Custom (specified...5HTML, PHP 5, Debug
Description 

Author

This class can display the values of variables for debugging.

It can take calls to static functions that take variable values to display.

The class can display the name of the static function followed by a dump of the variable value according to its type using its own code to display the variable value.

The values can be rendered optionally to be displayed in HTML pages using colors to distinguish the types of variables.

Innovation Award
PHP Programming Innovation award winner
February 2021
Winner
Debugging applications is a common activity that many developers perform in order to find and fix issues in their code.

As part of the debugging activity, displaying values of variables in certain parts of the code that has issues, is an essential part of the developer work.

This class provides a solution to display variable values that can format the values in a colored way to highlight different parts of the values.

The class can also display the name of the section of the code that is being inspected by showing that name near the values of the variable being displayed, as if it was the name of a function that is calling some code passing the variable value as parameter.

Manuel Lemos
Picture of Owen Hester
  Performance   Level  
Name: Owen Hester <contact>
Classes: 2 packages by
Country: United States United States
Age: 40
All time rank: 4316548 in United States United States
Week rank: 200 Up22 in United States United States Up
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Documentation

urp &bull; PHP debug print.

Basic Usage

use \radsectors\urp as urp;

urp::hello("Hello world.");
urp::number(7);
urp::try_this(4.893);
urp::label(true);
urp::items(['one' => 1, 'two' => 2, 'three' => 'green']);
urp::whatever(new \DateTime());

Sample Output:

hello: string(12) "Hello world."
number: int(7)
try_this: float(4.893)
label: bool(true)
items: array(3) {
  ["one"] => int(1)
  ["two"] => int(2)
  ["three"] => string(5) "green"
}
whatever: object(DateTime)#3 (3) {
  ["date"] => string(26) "2016-09-23 19:22:16.000000"
  ["timezone_type"] => int(3)
  ["timezone"] => string(15) "America/Chicago"
}

  Files folder image Files (7)  
File Role Description
Files folder image.vscode (1 file)
Files folder imagesrc (2 files)
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (7)  /  .vscode  
File Role Description
  Accessible without login Plain text file launch.json Data Auxiliary data

  Files folder image Files (7)  /  src  
File Role Description
  Accessible without login Plain text file legacy.php Aux. Auxiliary script
  Plain text file urp.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:90
This week:0
All time:9,950
This week:488Up