2017 © Pedro Peláez
 

library js-phpize

Convert js-like syntax to standalone PHP code.

image

js-phpize/js-phpize

Convert js-like syntax to standalone PHP code.

  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 66 Versions
  • 10 % Grown

The README.md

JsPhpize

Latest Stable Version Build Status StyleCI Test Coverage Code Climate, (*1)

Convert js-like syntax to standalone PHP code., (*2)

Install

In the root directory of your project, open a terminal and enter:, (*3)

composer require js-phpize/js-phpize

Usage

Use compile to get PHP equivalent code to JavaScript input:, (*4)

use JsPhpize\JsPhpize;

$jsPhpize = new JsPhpize();

echo $jsPhpize->compile('foo = { bar: { "baz": "hello" } }');

This code will output the following PHP code:, (*5)

$foo = array( "bar" => array( "baz" => "hello" ) );

Or use render to execute it directly:, (*6)

use JsPhpize\JsPhpize;

$jsPhpize = new JsPhpize();

$code = '
    // Create an object
    foo = { bar: { "baz": "hello" } };
    key = 'bar'; // instanciate a string

    return foo[key].baz;
';

$value = $jsPhpize->render($code);

echo $value;

This will display hello., (*7)

This library intend to is intended to allow js-like in PHP contexts (such as in template engines)., (*8)

See the Phug documentation to see an implementation example as Pug expressions PHP converter., (*9)

And also check examples to see more examples (.js files are input examples js-phpize can handle and either .return show you what the engine will return for this code, or .php show you how it's compiled into PHP)., (*10)

The Versions

03/07 2018

dev-master

9999999-dev

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • ext-mbstring *
  • php >=7.0

 

The Development Requires

10/06 2018

2.0.0

2.0.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=7.0
  • ext-mbstring *

 

The Development Requires

06/02 2018

1.14.0

1.14.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *

 

The Development Requires

31/01 2018

1.13.0

1.13.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *

 

The Development Requires

09/01 2018

1.12.2

1.12.2.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *

 

The Development Requires

04/01 2018

1.12.1

1.12.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *

 

The Development Requires

05/12 2017

1.12.0

1.12.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *

 

The Development Requires

27/09 2017

1.11.2

1.11.2.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *

 

The Development Requires

07/09 2017

1.11.1

1.11.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-mbstring *

 

The Development Requires

06/09 2017

dev-refactor

dev-refactor

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

06/09 2017

1.11.0

1.11.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

30/08 2017

1.10.2

1.10.2.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

23/07 2017

1.10.1

1.10.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

30/06 2017

1.10.0

1.10.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

27/06 2017

1.9.1

1.9.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

20/06 2017

1.9.0

1.9.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

19/06 2017

1.8.1

1.8.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

19/06 2017

dev-analysis-qoKBob

dev-analysis-qoKBob

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

19/06 2017

1.8.0

1.8.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

19/06 2017

1.7.8

1.7.8.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

18/06 2017

1.7.7

1.7.7.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

18/06 2017

1.7.6

1.7.6.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

18/06 2017

1.7.5

1.7.5.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

18/06 2017

1.7.4

1.7.4.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

18/06 2017

1.7.3

1.7.3.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

18/06 2017

1.7.2

1.7.2.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

17/06 2017

1.7.1

1.7.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

17/06 2017

1.7.0

1.7.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

17/06 2017

1.6.0

1.6.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

14/06 2017

1.5.1

1.5.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

14/06 2017

dev-analysis-8naGpv

dev-analysis-8naGpv

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

14/06 2017

1.5.0

1.5.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

08/06 2017

1.4.2

1.4.2.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

31/05 2017

1.4.1

1.4.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

25/05 2017

1.4.0

1.4.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

14/02 2017

1.3.0

1.3.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

03/02 2017

1.2.2

1.2.2.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

09/01 2017

1.2.1

1.2.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

29/12 2016

1.2.0

1.2.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

29/12 2016

dev-dependencies-merge

dev-dependencies-merge

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

04/12 2016

1.1.0

1.1.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

30/11 2016

1.0.1

1.0.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

30/11 2016

1.x-dev

1.9999999.9999999.9999999-dev

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

30/11 2016

1.0.0

1.0.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

29/11 2016

0.2.4

0.2.4.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

29/11 2016

dev-function-calls

dev-function-calls

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

29/11 2016

0.2.3

0.2.3.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

28/11 2016

dev-switch

dev-switch

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

28/11 2016

dev-ci-php-7.1

dev-ci-php-7.1

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

28/11 2016

dev-ternary

dev-ternary

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

27/11 2016

0.2.2

0.2.2.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

27/11 2016

dev-lambda

dev-lambda

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

27/11 2016

0.2.1

0.2.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

25/11 2016

0.2.0

0.2.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

01/10 2016

0.1.11

0.1.11.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

29/08 2016

0.1.10

0.1.10.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

29/08 2016

0.1.9

0.1.9.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

26/08 2016

0.1.8

0.1.8.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

26/08 2016

0.1.7

0.1.7.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

17/08 2016

0.1.6

0.1.6.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

17/08 2016

0.1.5

0.1.5.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

17/08 2016

0.1.4

0.1.4.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

15/08 2016

0.1.3

0.1.3.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

15/08 2016

0.1.2

0.1.2.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

14/08 2016

0.1.1

0.1.1.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

14/08 2016

0.1.0

0.1.0.0

Convert js-like syntax to standalone PHP code.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires