Use PHP functions in JavaScript

Compile your own php.js

The complete php.js packages are very large and should only be used for study purposes.

If you intend to use some php.js functions for production, you might be better off creating a customized version of the php.js package, with only the functions you need.

That's what this tool is for.

Presets

You can select any of these templates, and customize it further below

Function Selection

Select your favorite functions. Note that the righthand "Info" block might be telling you something.

        Arrays
        BCMath Arbitrary Precision Mathematics
        Character type checking
        Class/Object Information
        Classkit
        Date and Time
        Directory Functions
          Error Handling and Logging
          Filesystem
          Function Handling
          Gettext
            Inclusion hierarchy viewer
              JavaScript Object Notation
              Language & Control Structures
              Mail
              Mathematical Functions
              Miscellaneous Functions
              Net Gopher
              Network
              Object Aggregation/Composition
              Object property and method call overloading
                Output Buffering Control
                PHP Options and Information
                Program execution Functions
                Regular Expressions (Perl-Compatible)
                Session Functions
                  Streams
                  Strings
                  Tokenizer
                    URLs
                    Variable handling
                    XML Parser
                    XMLReader
                      XMLWriter
                        [internal] php.js shared libs
                        [internal] php.js shared libs - legacy
                          i18n
                          runkit
                          xdiff

                          Options

                          How shall we wrap this package up?

                          Namespaced
                          Compression

                          Compile

                          Preferred package name?

                          .js

                          (It could that your config already has a name attached to it.)

                          Bombs away! Maybe a good time to get some coffee!

                          Info

                          Log

                          Support us

                          spread the word:


                          Use any PHP function in JavaScript


                          These kind folks have already donated: AYHAN BARI*, Nikita Ekshiyan, Nikita Ekshiyan, Petr Pavel, @HalfWinter, Paulo Freitas, Andros Peña Romo, @andorosu, Raimund Szabo, Nitin Gupta, @nikosdion, Anonymous, Anonymous and Shawn Houser.
                          <your name here>

                          Click here to lend your support to: phpjs and make a donation at www.pledgie.com !