Download the PHP package jpuck/phpdev without Composer
On this page you can find all versions of the php package jpuck/phpdev. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package phpdev
Short Description A collection of classes useful for code under construction.
License MIT
Informations about the package phpdev
PHP Developer Utilities
A collection of PHP 7 classes useful for code under construction.
Branch | Status |
---|---|
master | |
dev |
Getting Started
This library is registered on packagist, so you can easily include it in your project using composer.
composer require jpuck/phpdev
Don't forget to require the autoloader in your script.
Functions
bool strbegins(String $haystack, String $needle)
Checks whether a string begins with a string.
mixed print_rt ( mixed $expression [, bool $return = false ] )
Tabulator wrapper for print_r
replaces 8 spaces with a tab.
Example displayed on console with tabs set to 4 spaces:
Array ( [first] => Array ( [second] => Array ( [third] => Array ( [forth] => Array ( [fifth] => 5 ) ) ) ) ) Array ( [first] => Array ( [second] => Array ( [third] => Array ( [forth] => Array ( [fifth] => 5 ) ) ) ) )
mixed arr_export ( array $array [, bool $return = false ] )
Format arrays using var_export
with tabs, square brackets, and
no trailing spaces after arrows to newlines.
Example displayed on console with tabs set to 4 spaces:
array ( 'first' => array ( 'second' => array ( 'third' => array ( 'forth' => array ( 'fifth' => 5, ), ), ), ), ) [ 'first' => [ 'second' => [ 'third' => [ 'forth' => [ 'fifth' => 5, ], ], ], ], ]
NOTICE: The documentation on using this function with objects is clear.
Note: To be able to evaluate the PHP generated by
var_export()
, all processed objects must implement the magic__set_state
method. Note that StdClass does not implement__set_state()
.
The above code will result in the following errors:
PHP Fatal error: Uncaught Error: Call to undefined method stdClass::__set_state()
PHP Fatal error: Uncaught Error: Call to undefined method Closure::__set_state()
null CleanMsSQLdb (PDO $pdo)
This is a dangerously powerful script for dropping everything from a Microsoft SQL Server database dbo schema.
- non-system stored procs
- views
- functions
- tables (regardless of Primary/Foreign Key constraints)