Index
Symbols
- " " (quotes, double), enclosing apostrophe in text in XHP, Validation
- & command, working with macros in hphpd, Macros
- && operator, Others
- &&, appending to breakpoint-setting command, Breakpoint expressions and conditions
- ' (apostrophe) in text in XHP, Validation
- * (repetition) operator (XHP), children Declarations
- + (repetition) operator (XHP), children Declarations
- -> method call syntax, Mixing Method Call Syntax
- : (colon) in XHP class names, Creating Your Own XHP Classes
- :: method call syntax, Mixing Method Call Syntax
- = command in hphpd, Evaluating Code, Local Mode
- == (equality) operator, use with collections, Operators
- === (identity) operator, use with collections, Operators
- ==> operator, Lambda Expressions
- ? (repetition) operator (XHP), children Declarations
- ?-> (nullsafe method call) operator, Nullsafe Method Call Operator
- @ command in hphpd, Evaluating Code, Local Mode
- @required attributes, Validation, Attributes
- [] (square brackets)
- __ (double underscore) in special attribute names, Special Attributes
- | (alternation) operator (XHP), children Declarations
- || operator, Others
- ‸ (caret), bitwise xor operator, Others
A
- admin server, The Admin Server
- Alternative PHP Cache (APC), Other built-ins
- and operator, Others
- any attribute specifier (XHP), children Declarations
- any pseudotype, Code Without Annotations
- arguments
- array shapes, Array Shapes-Array Shapes
- array type, Hack’s Type System
- arraykey type, Hack’s Type System
- arrays
- collections interoperating with, Interoperating with Arrays
- copy-on-write in PHP, Collections Have Reference Semantics
- generic, syntax of, Hack’s Type System
- implementing Traversable in PHP, Core Interfaces
- keys containing string representations of integers, Reading and Writing
- subtypes and generics, Arrays and Collections
- tuples as, Hack’s Type System
- using collections instead of, Why Use Collections?
- value semantics, Collections Have Reference Semantics
- array_diff() function, Other built-ins
- array_filter() function, Mapping and Filtering Helpers
- array_key_exists() function, isset, empty, and unset
- array_map() function, Mapping and Filtering Helpers
- array_pop() function, Other built-ins
- array_push() function, Other built-ins
- array_shift() function, Other built-ins
- array_unshift() function, Other built-ins
- asio-utilities library, Async in Detail
- assignment statement as command (hphpd), Evaluating Code
- assume_php configuration option, Calling into PHP
- async keyword, Introductory Examples
- AsyncGenerator interface, Async Generators
- asynchronous (async) functions, Async-Streams, Unsupported Features
- and callable types, Async and Callable Types
- async extensions, Async Extensions
- async generators, Async Generators-Async Generators
- async XHP, Async XHP
- await, not an expression, await Is Not an Expression
- common mistakes, Common Mistakes
- examples, introductory, Introductory Examples-Introductory Examples
- exceptions in, Exceptions in Async Functions-Exceptions in Async Functions
- mapping and filtering helper functions, Mapping and Filtering Helpers-Mapping and Filtering Helpers
- other types of waiting, Other Types of Waiting
- structuring async code, Structuring Async Code-The multi-ID pattern
- threads and, Dropping Wait Handles
- wait handles, Wait Handles
- AsyncIterator interface, Async Generators
- AsyncKeyedIterator interface, Async Generators
- AsyncMysqlClient class, Connecting and querying
- AsyncMysqlConnection class, Connecting and querying, Connection pools
- AsyncMysqlConnectionPool class, Connection pools
- AsyncMysqlErrorResult class, Query results
- AsyncMysqlResult class, Query results
- asyncRender() function, Async XHP
- attributes, Attributes-Special Attributes
- autoloading, Autoload Everything
- autoload_set_paths() function, Enhanced Autoloading
- await as, Async Generators
- await keyword, Introductory Examples
- Awaitable interface, Introductory Examples
- awaiting (async functions), Introductory Examples
B
- Batcher class, Batching
- batching data fetching, Batching
- bool type, Hack’s Type System
- Bootstrap library, XHP Best Practices
- bottom-up migration, Top-down or bottom-up migration
- break list command (hphpd), Managing Breakpoints
- break statement, arguments to, Others
- breakpoints, Using Breakpoints
- BypassAccessCheck option (hphpd), Configuring hphpd
C
- call stack, navigating from hphpd breakpoint, Navigating the Call Stack
- callable types, Hack’s Type System
- case-insensitive name lookup, Case-Insensitive Name Lookup
- categories
- chained method calls, Hack’s Type System
- chains of dependencies, Data Dependencies
- character references (HTML), HTML character references
- child objects (XHP), Basic Tag Usage
- children declarations, XHP classes, children Declarations
- class attribute, managing with XHPHelpers, Managing the class attribute
- classes
- closing tags (XHP), Basic Tag Usage
- closures
- Collection interface, General Collection Interfaces
- collection literals, Literal Syntax, Unsupported Features
- collections, Collections-Non-built-in functions
- adding values to, Adding values
- advantages of using, Why Use Collections?
- await-a-collection helpers, Awaiting in a loop
- classes in Hack, Collections
- concrete classes, Concrete Collection Classes
- deleting values from, Deleting values
- equality comparisons with == operator, Operators
- general collection interfaces, General Collection Interfaces
- identity comparisons with === operator, Operators
- immutable, Immutable collections
- interoperating with arrays, Interoperating with Arrays
- iterating over with foreach, Iterating
- reading and writing, Reading and Writing
- reference semantics, Collections Have Reference Semantics
- specific collection interfaces, Specific Collection Interfaces
- subtypes and generics, Arrays and Collections
- type annotations for, Type Annotations for Collections
- command-line interface (HHVM), wrapper script for, Server Mode
- command-line mode, Server Mode
- comments
- Composer package manager, Async in Detail, How to Use XHP
- conditional breakpoints, Breakpoint expressions and conditions
- configuring HHVM, Configuring and Deploying HHVM
- configuring hphpd, Configuring hphpd
- connection pools (MySQL async extension), Connection pools
- connections, database (MySQL async extension), Connecting and querying
- __ConsistentConstruct attribute, Special Attributes
- ConstCollection interface, General Collection Interfaces
- ConstMap interface, Specific Collection Interfaces
- constraint type, adding to opaque type alias, Opaque Type Aliases
- constraints on generic type parameters, Constraints-Unresolved Types, Revisited
- constructor parameter promotion, Constructor Parameter Promotion
- constructors, old-style, Old-Style Constructors
- ConstSet interface, Specific Collection Interfaces
- ConstVector interface, Collections Have Reference Semantics, Specific Collection Interfaces
- Container interface, Core Interfaces
- contains() method, Reading and Writing
- containsKey() method, Reading and Writing
- contexts in XHP, Context
- continue command (hphpd), Navigating Code
- continue statement, arguments to, Others
- contravariance, Advanced: Covariance and Contravariance
- contravariant positions, When to Use Them
- control flow tags, avoiding in XHP, Don’t Make Control Flow Tags
- cooperative multitasking, Async
- copy-on-write (arrays), Collections Have Reference Semantics
- count() function, Other built-ins
- covariance, Advanced: Covariance and Contravariance
- covariant positions, When to Use Them
- create_function() function, Others
- cross-site scripting (see XSS)
- cURL async extension, Introductory Examples, cURL
- curl utility, sending commands to HHVM admin server, The Admin Server
- current() function, Other built-ins
D
- data dependencies (async code), Data Dependencies
- databases, fetching data from, Data Dependencies
- debugger prompt, Getting Started
- debugging functions, use with collections, Other built-ins
- debugging, interactive (see hphpd interactive debugger)
- debug_zval_dump() function, Other built-ins
- decl mode, Typechecker Modes
- dependencies (see data dependencies)
- dependent queries, The multi-ID pattern
- __destruct() methods, Important Options
- documentation, viewing for code in hphpd, Viewing Code and Documentation
- dummy sandboxes, Remote Mode
- dynamic properties, Dynamic Properties
- dynamic typing versus static typing, Typechecking
E
- empty() function, isset, empty, and unset, Reading and Writing
- enumerations (see enums)
- enums, Hack’s Type System, Enums-Enum Functions
- error messages, Hack typechecker, Reading Error Messages
- errors
- escaping HTML special characters, Secure by Default
- eval() function, Others
- exceptions in async functions, Exceptions in Async Functions-Exceptions in Async Functions
- execution environment (hphpd), The Execution Environment
- extract() function, Others
F
- Facebook, migration to Hack, Top-down or bottom-up migration
- fallthrough in switch statements, typechecking rules for, Fallthrough in switch Statements
- false dependencies in async code, Antipatterns
- FastCGI server, Server Mode
- fastcgi_param directive, Server Mode
- fastcgi_pass directive, Server Mode
- filtering helpers (async), Mapping and Filtering Helpers-Mapping and Filtering Helpers
- float type, Hack’s Type System
- flushing (XHP), The Hack Library
- foreach statement
- frame command (hphpd), Navigating Code, Viewing Code and Documentation
- fun() function, Hack’s Type System
- function keyword, Hack’s Type System, Introductory Examples
- function parameters, type annotations, Function Parameters
- function return types, type annotations, Function Return Types
- functions
- as callable type, Hack’s Type System
- async and regular, syntactic differences, Introductory Examples
- autoloading, Enhanced Autoloading
- deciding to make async, Data Dependencies
- generic, Functions and Methods
- looking up documentation in hphpd, Viewing Code and Documentation
- memoizing, Special Attributes
- setting breakpoints on, Setting Breakpoints
- taking arrays as arguments, using collections instead, Use with Built-In and User Functions
- type inference, restrictions on, Inference Is Function-Local
G
- garbage collection, problems with references, References
- generators
- generics, Hack’s Type System, Generics-Contravariance
- attribute types in XHP, Attribute types
- constraints on type parameters, Constraints-Unresolved Types, Revisited
- covariance and contravariance, Advanced: Covariance and Contravariance
- example generic class, Introductory Example-Introductory Example
- functions and methods, Functions and Methods
- generator types, Types for Generators
- subtypes and, Generics and Subtypes
- traits and interfaces, Traits and Interfaces
- type aliases, Type Aliases
- type erasure, Type Erasure-Type Erasure
- global statement, The global Statement
- goto statement, Others
H
- h2tp command, Transpiling Hack to PHP
- Hack
- defined, What Are Hack and HHVM?
- embedding Hack code in XHP, Embedding Hack Code
- file opening symtax, Setting Up the Typechecker
- gradual migration from PHP, Gradual Migration
- library of core XHP classes, The Hack Library
- origins of, Preface
- program types, Program Types
- static typechecking, How the Book Is Organized
- tools, Hack Tools-Unsupported Features
- type system, Hack’s Type System-Calling into PHP
- typechecker, What Are Hack and HHVM?, Typechecking
- version 3.6, Versions
- Hackficator tool, The Hackificator
- Hacklib, Transpiling Hack to PHP
- hack_remove_soft_types command, Removing incorrect annotations
- help or ? command (hphpd), Getting Started
- .hhconfig file, Setting Up the Typechecker
- HHVM (HipHop Virtual Machine), Preface
- async extension functions, Introductory Examples
- async extensions in version 3.6, Async Extensions
- async helper functions, Wait Handles
- autoloading support, Autoload Everything
- configuring, Configuring and Deploying HHVM
- defined, What Are Hack and HHVM?
- generics and, Type Erasure
- gradual migration from PHP, Gradual Migration
- memoized functions and, Special Attributes
- program types, Program Types
- runtime typechecking, Enforcement of Type Annotations at Runtime
- version 3.6, Versions
- hhvm -m debug command, Getting Started
- hhvm.enable_obj_destruct_call option, Important Options
- hhvm.enable_xhp option, How to Use XHP
- hhvm.hack.lang.look_for_typechecker option, Important Options
- hhvm.hhbc file, Building the Repo
- hhvm.jit_enable_rename_function option, Important Options
- hhvm.jit_profile_interp_requests option, Warming Up the JIT
- hhvm.repo.authoritative option, Deploying the Repo
- hhvm.repo.central.path option, Deploying the Repo
- hhvm.server.source_root option, Deploying the Repo
- hhvm.server.thread_count option, Important Options
- hhvm.source_root option, Important Options
- hhvm_wrapper script, Server Mode
- HHAsiocurl_exec() function, cURL
- HHAsiojoin() function, Wait Handles, Data Dependencies
- HHAsiolater() function, Polling, Batching
- HHAsiom() function, Wait Handles
- HHAsioResultOrExceptionWrapper interface, Exceptions in Async Functions
- HHAsiousleep() function, Async Generators, Sleeping
- HHAsiov() function, Wait Handles, Streams
- HHAsiowrap() function, Exceptions in Async Functions, MCRouter and memcached
- hh_client tool, Inspecting the Codebase
- options for inspecting the codebase, Inspecting the Codebase
- --find-class-refs, Inspecting the Codebase
- --find-refs, Inspecting the Codebase
- --inheritance-ancestors, Inspecting the Codebase
- --inheritance-children, Inspecting the Codebase
- --search, Inspecting the Codebase
- --search-class, Inspecting the Codebase
- --search-constant, Inspecting the Codebase
- --search-function, Inspecting the Codebase
- --search-typedef, Inspecting the Codebase
- --type-at-pos, Inspecting the Codebase
- scripting support, Scripting Support
- HH_FIXME comment, Silencing Typechecker Errors
- hh_server --convert, Adding annotations
- HPHPc transformer, Preface
- hphpd interactive debugger, hphpd: Interactive Debugging-Configuring hphpd
- hphpd.ini file, Configuring hphpd
- hphpd_break() function, Breaking from code
- HTML
- HTML strings, Secure by Default
- htmlspecialchars() function, Secure by Default
I
- id attributes, Unique IDs
- ImmMap class, Collections, Immutable collections, Concrete Collection Classes
- ImmSet class, Collections, Immutable collections, Concrete Collection Classes
- immutable collections, Immutable collections
- immutable() method, collection classes, Collections Have Reference Semantics
- ImmVector class, Collections, Immutable collections, Concrete Collection Classes
- implode() function, Other built-ins
- Indexish interface, Core Interfaces
- indices
- info command (hphpd), Viewing Code and Documentation
- inheritance, preferring composition over, Composition, Not Inheritance
- INI format (configuration files), Specifying Configuration Options
- instance methods
- instanceof operator, Refining Object Types
- inst_meth() function, Hack’s Type System
- int type, Hack’s Type System
- integer arithmetic overflow, Integer Arithmetic Overflow
- interactive debugging (see hphpd interactive debugger)
- interfaces
- introspection functions, use with collections, Other built-ins
- invariance, Advanced: Covariance and Contravariance
- invariant() function, Using Superglobals, Refining Nullable Types to Non-Nullable
- isset() function, isset, empty, and unset, Reading and Writing
- Iterable interface, Core Interfaces
- Iterator interface, Core Interfaces
- IteratorAggregate interface, Core Interfaces
- iterators, async, Async Generators
M
- machine command (hphpd), Remote Mode
- macros in hphpd, Macros
- Map class, Collections, Concrete Collection Classes
- mapping and filtering helpers (async), Mapping and Filtering Helpers-Mapping and Filtering Helpers
- MaxCodeLines option (hphpd), Configuring hphpd
- MCRouter async extension, MCRouter and memcached-MCRouter and memcached
- memcached, MCRouter async extension and, MCRouter and memcached-MCRouter and memcached
- memoization, Special Attributes, Collections Have Reference Semantics
- __Memoize attribute, Special Attributes, Memoizing Async Functions, Unsupported Features
- method calls, chained, Hack’s Type System
- methods
- as callable type, Hack’s Type System
- async, Introductory Examples
- enum, Enum Functions
- generic, Functions and Methods
- looking up documentation in hphpd, Viewing Code and Documentation
- memoizing, Special Attributes
- mixing method call syntax, Mixing Method Call Syntax
- nullsafe method call operator, Nullsafe Method Call Operator
- overriding, types of, Types of Overriding Methods
- return type annotations, Function Return Types
- setting breakpoints on, Setting Breakpoints
- meth_caller() function, Hack’s Type System
- microseconds, Sleeping
- mixed type, Hack’s Type System
- monomorphic, Program Types
- MutableMap interface, Specific Collection Interfaces
- MutableSet interface, Specific Collection Interfaces
- MutableVector interface, Specific Collection Interfaces
- MySQL async extension, Introductory Examples, MySQL-Query results
N
- name lookup, case-insensitive, Case-Insensitive Name Lookup
- named entities, Typechecker Modes
- new expression, replacing XHP tag syntax, The Parser Transformation
- next command (hphpd), Navigating Code, Configuring hphpd
- nginx web servers, Server Mode
- null values, function parameter annotations and, Function Parameters
- nullable types, Hack’s Type System
- nullsafe method call operator, Nullsafe Method Call Operator
- num type, Hack’s Type System
P
- Pair class, Collections, Adding values
- parameterized types, Hack’s Type System
- parameters
- parser transformation (XHP), The Parser Transformation
- partial mode, Typechecker Modes
- pcdata attribute specifier (XHP), children Declarations
- PGO (profile-guided optimization), Warming Up the JIT
- PHP
- calling into PHP code from Hack, Calling into PHP
- conversion to C++, Preface
- features not supported in Hack, PHP Features Not Supported in Hack-Others
- case-insensitive name lookup, Case-Insensitive Name Lookup
- dynamic properties, Dynamic Properties
- isset, empty, and unset, isset, empty, and unset
- mixing method call syntax, Mixing Method Call Syntax
- old-style constructors, Old-Style Constructors
- other miscellaneous features, Others
- references, References-Top-Level Code
- variable variables, Variable Variables
- function parameter typehints, Function Parameters
- gradual migration from, with Hack, Gradual Migration
- Hack and, Who This Book Is For
- Hack and HHVM versions and, Versions
- migrating to Hack, Migrating PHP to Hack-Hardening annotations
- primitive types, Hack’s Type System
- return typehint in version 7, Function Return Types
- transpiling Hack to, Transpiling Hack to PHP-Unsupported Features
- variadic functions in version 5.6, Typed Variadic Arguments
- polling, Polling
- preemptive multitasking, Async
- primitive types in Hack, Hack’s Type System
- PrintLevel option (hphpd), Configuring hphpd
- print_r() function, Other built-ins
- profile-guided optimization (PGO), Warming Up the JIT
- program types, Program Types
- properties
R
- raw strings, Secure by Default
- read-eval-print loop (REPL), hphpd, hphpd: Interactive Debugging
- reference semantics, Collections Have Reference Semantics
- references, References-Top-Level Code
- register_shutdown_function(), Setting Breakpoints
- remote mode (hphpd), The Execution Environment, Remote Mode
- rename_function() function, Important Options
- render() method, XHP, Creating Your Own XHP Classes
- repo schema ID, Deploying the Repo
- repo-authoritative mode, Repo-Authoritative Mode
- require extends ClassName statement, Trait and Interface Requirements
- require implements InterfaceName statement, Trait and Interface Requirements
- @required attributes, Validation, Attributes
- rescheduling a wait handle, Rescheduling
- reset() function, Other built-ins
- resource type, Hack’s Type System
- ResultOrExceptionWrapper interface, Exceptions in Async Functions
- return types
- run command (hphpd), Local Mode
S
- same-origin policy, Secure by Default
- sandbox mode, Remote Mode
- sandboxes, Remote Mode
- scripting support, hh_client, Scripting Support
- sed, Removing incorrect annotations
- self-closing tags (XHP), Basic Tag Usage
- serialization formats, Secure by Default
- serialization, of generic type aliases, Type Aliases
- serialize() function, using with collections, Other built-ins
- server mode, Server Mode
- $_SERVER variable, Specifying Configuration Options
- Set class, Collections, Concrete Collection Classes
- set command (hphpd), Configuring hphpd
- shape keyword, Array Shapes
- shapes, Hack’s Type System
- shell command line, specifying configuration options for HHVM, Specifying Configuration Options
- ShortPrintCharCount option (hphpd), Configuring hphpd
- sleeping, async, Sleeping
- SmallSteps option (hphpd), Configuring hphpd
- soft annotations, Enforcement of Type Annotations at Runtime
- sort built-in functions, using with collections, The sort built-ins
- SQLite3, Building the Repo
- StableMap class, Collections
- stack trace, printing in hphpd, Navigating the Call Stack
- StackArgs option (hphpd), Configuring hphpd
- startup macro (hphpd), Macros
- static methods
- static typing versus dynamic typing, Typechecking
- step command (hphpd), Navigating Code, Navigating Code, Configuring hphpd
- storage backends, fetching data from, Data Dependencies
- streams async extension, Streams
- stream_await() function, Streams
- stream_select() function, Streams
- strict mode, Typechecker Modes
- string type, Hack’s Type System
- Stringish interface, Attribute types
- strings
- style guidelines for XHP, Style Guide
- subcommands in hphpd, Getting Started
- subtypes, generics and, Generics and Subtypes
- superglobals, typechecking rules for, Using Superglobals
- switch statements
- syntax highlighting in text editors, Validation
T
- tags
- $this, static versus non-static method calls, Mixing Method Call Syntax
- this return type, Hack’s Type System
- thread count in server mode, Important Options
- threads, async functions and, Dropping Wait Handles
- time measurements on computers, Sleeping
- top-down migration, Top-down or bottom-up migration
- top-level code
- traits, Unsupported Features
- transparent type aliases, Transparent Type Aliases
- transpiling Hack to PHP, Transpiling Hack to PHP-Unsupported Features
- Traversable interface, Core Interfaces
- tuples, Hack’s Type System
- two's complement arithmetic, integer arithmetic as, Integer Arithmetic Overflow
- type aliases, Hack’s Type System, Type Aliases-Autoloading Type Aliases
- type annotations, Why Use the Typechecker?, Type Annotation Syntax
- collections, Type Annotations for Collections
- for instance of a generic class, Introductory Example
- function parameters, Function Parameters
- function return types, Function Return Types
- hardening, Hardening annotations
- incorrect, removing, Removing incorrect annotations
- inferring and adding in PHP to Hack migration, Inferring and Adding Type Annotations
- properties, Properties
- soft annotations, Enforcement of Type Annotations at Runtime
- XHP, Type Annotations for XHP
- type arguments, Introductory Example
- type erasure, Type Erasure
- type inference, Type Inference
- type parameters, Hack’s Type System, Introductory Example
- typechecker (Hack), What Are Hack and HHVM?, Typechecking
- typechecking
- calling into PHP, Calling into PHP
- code without annotations, Code Without Annotations
- enforcement of type annotations at runtime, Enforcement of Type Annotations at Runtime
- generic covariance and contravariance, restrictions on, When to Use Them
- refining types, Refining Types
- restrictions on shapes, Array Shapes
- rules, Rules-Fallthrough in switch Statements
- traits, requirements for, Trait and Interface Requirements
- types
X
- :x:frag class, Type Annotations for XHP
- XHP, XHP-The Hack Library
- advantages of using, Why Use XHP?
- attributes, Attributes
- basic tag usage, Basic Tag Usage
- best practices, XHP Best Practices-Style Guide
- creating your own classes, Creating Your Own XHP Classes
- embedding Hack code, Embedding Hack Code
- internals, XHP Internals
- migrating to, Migrating to XHP
- objects, public methods for manipulating, Object Interface
- runtime validation with, Runtime Validation
- security for web apps, Secure by Default
- type annotations for, Type Annotations for XHP
- using, How to Use XHP
- validation of, Validation
- writing your own classes
- :xhp class, Basic Tag Usage
- XHP-Bootstrap, XHP Best Practices
- XHPAlwaysValidChild interface, Getting Around XHP’s Escaping
- XHPAsync trait, Async XHP
- XHPChild interface, Type Annotations for XHP
- XHPHelpers trait, Inheriting attributes, XHP Helpers-Managing the class attribute
- XHPRoot interface, Type Annotations for XHP
- XHPUnsafeRenderable interface, Getting Around XHP’s Escaping
- xor operator, Others
- XSS (cross-site scripting), Secure by Default
..................Content has been hidden....................
You can't read the all page of ebook, please click
here login for view all page.