Lines Matching full:php
1 Use in PHP {#flatbuffers_guide_use_php}
6 Before diving into the FlatBuffers usage in PHP, it should be noted that
9 (including PHP). This page is specifically designed to cover the nuances of
10 FlatBuffers usage in PHP.
17 ## FlatBuffers PHP library code location
19 The code for FlatBuffers PHP library can be found at `flatbuffers/php`. You
21 GitHub page](https://github.com/google/flatbuffers/tree/master/php).
25 The code to test the PHP library can be found at `flatbuffers/tests`.
26 The test code itself is located in [phpTest.php](https://github.com/google/
27 flatbuffers/blob/master/tests/phpTest.php).
29 You can run the test with `php phpTest.php` from the command line.
31 *Note: The PHP test file requires
32 [PHP](http://php.net/manual/en/install.php) to be installed.*
34 ## Using theFlatBuffers PHP library
37 example of how to use FlatBuffers in PHP.*
39 FlatBuffers supports both reading and writing FlatBuffers in PHP.
41 To use FlatBuffers in your own code, first generate PHP classes from your schema
42 with the `--php` option to `flatc`. Then you can include both FlatBuffers and
45 For example, here is how you would read a FlatBuffer binary file in PHP:
50 ~~~{.php}
51 // It is recommended that your use PSR autoload when using FlatBuffers in PHP.
58 // Contains the `*.php` files for the FlatBuffers library and the `flatc` generated files.
59 $paths = array(join(DIRECTORY_SEPARATOR, array($root_dir, "php")),
62 $file = join(DIRECTORY_SEPARATOR, array($path, $class . ".php"));
81 ~~~{.php}
89 from PHP.