1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! PHP engine semantics in Rust.
//!
//! Utopia crates must behave exactly like their PHP libraries, and much of
//! that behaviour comes from the PHP engine rather than the library: type
//! juggling, `is_numeric`, `(string)` casts, loose comparison, `strtolower`,
//! `mb_*`, `number_format`, `json_encode`/`json_decode`, `filter_var`,
//! `parse_url`. Each is reimplemented here once, and Utopia crates use these
//! functions instead of their own approximations.
//!
//! PHP values are [`Value`] ([`types`]): byte strings, ordered arrays with
//! integer and string keys, `stdClass`, and crate-defined objects. The
//! codecs ([`json`], [`serialize`], [`igbinary`]), comparisons and
//! [`sort`] work on it. Older string-level helpers ([`value`], [`string`],
//! [`format`], [`filter`]) take request-model `serde_json::Value`s, decoded
//! the way `Utopia\Http\Request` decodes bodies (objects are associative
//! arrays, except empty objects, which stay `stdClass`; [`Value::from_json`]
//! is the same mapping).
/// The getting started guide (`guide.md`), compiled and run with the doctests.
;
pub use ;