|
9 | 9 | - /pages/contact
|
10 | 10 | ---
|
11 | 11 |
|
12 |
| -php.js is a resource that offers community-built JavaScript alternatives for PHP functions. |
| 12 | +php.js is a resource that offers community-built JavaScript alternatives to PHP functions. |
13 | 13 |
|
14 |
| -If you want to perform high-level operations on JavaScript platforms such as webbrowsers, node.js, etc, you probably need to write JS that combines its lower-level functions and build it up until you have something useful like: |
| 14 | +If you want to perform high-level operations on JavaScript platforms such as |
| 15 | +webbrowsers, node.js, etc, you probably need to write JS that combines its |
| 16 | +lower-level functions and build it up until you have something useful like: |
15 | 17 | [strip_tags](http://phpjs.org/functions/strip_tags/),
|
16 | 18 | [strtotime](http://phpjs.org/functions/strtotime/),
|
17 | 19 | [strftime](http://phpjs.org/functions/strftime/),
|
18 | 20 | [number_format](http://phpjs.org/functions/number_format/),
|
19 | 21 | [wordwrap](http://phpjs.org/functions/wordwrap/), or
|
20 | 22 | [date](http://phpjs.org/functions/date/).
|
21 | 23 |
|
22 |
| -PHP is a language with many high-level functions and while they're not always implemented as consistently as we'd like (mimicking their underlying C parts), it has a huge following familiar with its functions. |
| 24 | +PHP is a language with many high-level functions and while they're not always |
| 25 | +implemented as consistently as we'd like (mimicking their underlying C parts), |
| 26 | +they do get many programming jobs done without the need for additional libraries |
| 27 | +or abstractions. |
23 | 28 |
|
24 | 29 | We recognize JS has beautiful language features, and we encourage you to learn them.
|
25 |
| -Never let php.js be an excuse not to. |
26 |
| -For the this reason we don't offer gigantic php.js packages or compilers anymore. |
| 30 | +Never let php.js be an excuse not to. For the this reason we don't offer |
| 31 | +gigantic php.js packages or compilers anymore. |
27 | 32 |
|
28 |
| -That said, we do think it's a challenge to port everything and decided to also port low-level PHP functions like |
| 33 | +That said, we do think it's a challenge to port everything and decided to also port |
| 34 | +low-level PHP functions like |
29 | 35 | [strpos](http://phpjs.org/functions/strpos/)
|
30 |
| -even though it has a perfectly fine (and more performant!) JavaScript counterpart ([String.indexOf](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/indexOf)). |
31 |
| -Besides the intellectual challenge of seeing how far we could come, porting ALL THE THINGS opens up php.js to be used for |
32 |
| -other fun thought excercises such as realtime in-browser debugging/running of PHP code, or running .php files with JavaScript interpreters. |
33 |
| -Also, there are quite a few PHP developers that use php.js just to learn how something is done in JavaScript. |
| 36 | +even though it has a perfectly fine (and more performant!) JavaScript |
| 37 | +counterpart ([String.indexOf](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/indexOf)). |
| 38 | + |
| 39 | +Besides the geeky-challenge of seeing how far we could come, porting ALL THE THINGS also |
| 40 | +opens up php.js to other fun experiments such as realtime in-browser debugging/running of |
| 41 | +PHP code, or running `.php` files with JavaScript engines such as V8. |
| 42 | + |
| 43 | +php.js also is a reference for PHP developers new to JavaScript, wanting to see how |
| 44 | +something can be done in JavaScript. |
| 45 | + |
| 46 | +And so we see ourselves as this big resource and leave it up to the developer |
| 47 | +to decide what makes sense to take from it. |
34 | 48 |
|
35 |
| -And so we see ourselves as this big resource and leave it up to the developer to decide what makes sense to take from it. |
36 | 49 | And what not.
|
37 | 50 |
|
38 |
| -Under the motto: "Make it work, then make it work better", we have plently of functions here online that aren't perfect just yet. |
| 51 | +Going by [The McDonald's Theory](https://medium.com/what-i-learned-building/9216e1c9da7d) |
| 52 | +we have plently of functions here online that aren't perfect just yet. |
39 | 53 | If you know how to improve, just send us a pull request on GitHub.
|
40 | 54 |
|
41 | 55 | ## Contributing
|
42 | 56 |
|
43 |
| -We use [github](http://github.com/kvz/phpjs) for collaboration. Comments are for remarks only. |
| 57 | +We use [GitHub](http://github.com/kvz/phpjs) for collaboration. Comments are for remarks only. |
44 | 58 | Please adhere to our [coding standards](https://github.com/kvz/phpjs/wiki/DeveloperGuidelines) before
|
45 | 59 | sending a pull request.
|
46 | 60 |
|
|
0 commit comments