# phpjs

> php.js offers community built php functions in javascript

Latest version **1.3.2** (published 2014-03-05) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install phpjs
pnpm add phpjs
yarn add phpjs
bun add phpjs
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.3.2 |
| Published | 2014-03-05 |
| First published | 2012-06-01 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 7 |
| Known vulnerabilities | 1 (+6 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3763 |
| Author | Kevin van Zonneveld |
| Maintainers | kvz |
| Keywords | php, js, phpjs |

## Links

- npm: https://www.npmjs.com/package/phpjs
- Repository: https://github.com/kvz/phpjs
- Homepage: http://phpjs.org
- Issues: https://github.com/kvz/phpjs/issues
- npm.io page: https://npm.io/package/phpjs

## Dependencies (7)

- [cli](https://npm.io/package/cli.md) 0.4.4-2
- [glob](https://npm.io/package/glob.md) 3.2.1
- [send](https://npm.io/package/send.md) 0.1.0
- [mocha](https://npm.io/package/mocha.md) 1.17.0
- [deep-equal](https://npm.io/package/deep-equal.md) 0.1.2
- [underscore](https://npm.io/package/underscore.md) 1.5.2
- [js-beautify](https://npm.io/package/js-beautify.md) 1.4.2

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.3.2 (latest) — 2014-03-05
- 1.2.2 — 2014-03-04
- 1.1.2 — 2014-03-04
- 1.0.2 — 2014-01-17
- 1.0.1 — 2014-01-17
- 1.0.0 — 2014-01-17
- 0.0.1 — 2012-06-01

## README

# php.js

<!-- badges/ -->
[![Build Status](https://secure.travis-ci.org/kvz/phpjs.png?branch=master)](http://travis-ci.org/kvz/phpjs "Check this project's build status on TravisCI")
[![NPM version](http://badge.fury.io/js/phpjs.png)](https://npmjs.org/package/phpjs "View this project on NPM")
[![Dependency Status](https://david-dm.org/kvz/phpjs.png?theme=shields.io)](https://david-dm.org/kvz/phpjs)
[![Development Dependency Status](https://david-dm.org/kvz/phpjs/dev-status.png?theme=shields.io)](https://david-dm.org/kvz/phpjs#info=devDependencies)
<!-- /badges -->

php.js is a resource that offers community-built JavaScript alternatives to PHP functions.

More info at: http://phpjs.org/about

## Npm

```bash
$ mkdir test && cd $_
$ npm install phpjs
$ $EDITOR try.js
```

```javascript
var php = require('phpjs');

php.echo(php.sprintf('Hey, %s : )', 'you'));
php.echo(php.parse_url('mysql://kevin:abcd1234@example.com/databasename')['pass']);
php.echo(php.strtotime('2 januari 2012, 11:12:13 GMT'));
```

```bash
$ node try.js
Hey, you : )
abcd1234
1325502733
```

## Testing


### cli

```bash
make test
```

```bash
node bin/phpjs.js --action test --name sort
node bin/phpjs.js --action test --category array
```

### Web

```bash
PORT=8080 node test/browser/server.js
```

Point your webbrowser to http://localhost:8080


## Sponsor development

<!-- badges/ -->
[![Gittip donate button](http://img.shields.io/gittip/kvz.png)](https://www.gittip.com/kvz/ "Sponsor the development of phpjs via Gittip")
[![Flattr donate button](http://img.shields.io/flattr/donate.png?color=yellow)](https://flattr.com/submit/auto?user_id=kvz&url=https://github.com/kvz/phpjs&title=phpjs&language=&tags=github&category=software "Sponsor the development of phpjs via Flattr")
[![PayPal donate button](http://img.shields.io/paypal/donate.png?color=yellow)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kevin%40vanzonneveld%2enet&lc=NL&item_name=Open%20source%20donation%20to%20Kevin%20van%20Zonneveld&currency_code=USD&bn=PP-DonationsBF%3abtn_donate_SM%2egif%3aNonHosted "Sponsor the development of phpjs via Paypal")
[![BitCoin donate button](http://img.shields.io/bitcoin/donate.png?color=yellow)](https://coinbase.com/checkouts/19BtCjLCboRgTAXiaEvnvkdoRyjd843Dg2 "Sponsor the development of phpjs via BitCoin")
<!-- /badges -->

---
_Source: https://npm.io/package/phpjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
