Skip to content
This repository has been archived by the owner on Dec 5, 2017. It is now read-only.

uuf6429/nice_r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nice_r()

Scrutinizer Code Quality

A nicer replacement for PHP's print_r(). Works with (at least) PHP 5.2 (tested).

Usage

Following a recent rewrite, this library has been converted into a class. However, an adapter is available for calling the library the old way.

The following example shows how one prints out PHP's $GLOBALS variable.

?><!DOCTYPE html>
<html dir="ltr" lang="en-US">
	<head>
		<link rel="stylesheet" type="text/css" href="nice_r.css?version=<?php echo filemtime('src/nice_r/nice_r.css'); ?>"/>
		<script type="text/javascript" src="nice_r.js?version=<?php echo filemtime('src/nice_r/nice_r.js'); ?>"></script>
	</head><body><?php

		require('Nicer.php');

		// oop way (reccomended)
		$n = new Nicer($GLOBALS);
		$n->render();
		
		// procedural way (requires nice_r.php)
		require('nice_r.php');
		nice_r($GLOBALS);

	?></body>
</html>

Screenshot

Screenshot

Report Issues/Bugs

Bugs

About

A nicer replacement for print_r.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published