-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathphp7_class_notes.txt
173 lines (134 loc) · 5.73 KB
/
php7_class_notes.txt
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
PHP 7 NOTES
NEW STUFF IN PHP 7.1
---------------------------------------------------------------------------------
see: https://github.com/php/php-src/blob/php-7.1.0beta3/UPGRADING
NOTES FROM CAL'S PRESENTATION
---------------------------------------------------------------------------------
Get link to MWOP's video on PSR-7
-- http://www.php-fig.org/psr/psr-7/
History of PHP
---------------------------------------------------------------------------------
BACKWARDS COMPATIBILITY BREAKS: things which could break your code
---------------------------------------------------------------------------------
RFC's
-- Funny ones!
-- New protocol: HTCPCP: https://www.ietf.org/rfc/rfc2324.txt
-- TCP over Carrier Pigeon: https://www.ietf.org/rfc/rfc1149.txt
-- https://wiki.php.net/rfc#php_70
Auto-vivification
-- automatic creation of new arrays and hashes as required every time an undefined value is dereferenced.
Dereferencing
-- indirection (?)
-- obtaining a value
Abstract Syntax Tree
-- https://wiki.php.net/rfc/abstract_syntax_tree
-- decouples the parsing from the compiling aspect in the interpreter
-- the AST based implementation is 10-15% faster, but requires more memory (from 10% to 70% more depending on file size)
Uniform Variable Syntax
-- https://wiki.php.net/rfc/uniform_variable_syntax
ZPP Failure on Overflow
-- https://wiki.php.net/rfc/zpp_fail_on_overflow
-- ZPP = zend_parse_parameters
-- If this happens, in php 7, an E_WARNING occurs ... which now generates an error which will stop the code
foreach behavior
-- https://wiki.php.net/rfc/php7_foreach
Dead / unmaintained extensions
Dead SAPIs:
• aolserver
• apache // NOTHING to do with PHP Apache Module!!!
• apache_hooks
• caudium
• continuity
• isapi
• milter
• phttpd
• pi3web
• roxen
• thttpd
• tux
• webjames
• apache2filter - not really dead, but currently broken
• nsapi
Extensions with unmaintained dependencies
• imap
• mcrypt // OLD mcrypt ... not the newer extension
Extensions not yet ported to PHP7
• interbase
• mssql
• oci8
• pdo_dblib
• pdo_oci
• sybase_ct
---------------------------------------------------------------------------------
HIGH IMPACT RFCs: new tools ... the *fun stuff*
---------------------------------------------------------------------------------
Moving phpng branch into master
-- https://wiki.php.net/rfc/phpng
-- concern over Facebook initiatives
---- HPHPc: "transpiler" for PHP (https://en.wikipedia.org/wiki/HipHop_for_PHP)
---- "hack" -- backward compatible version of PHP developed by Facebook
---- http://hacklang.org/
-- nearly 100% compatible and provides anywhere between 20% and 110% performance gains
-- Drupal shown on benchmark slide is version 7
NOTES ON PHP7_CLASS.PDF
---------------------------------------------------------------------------------
replaced "json" extension with "jsond"
-- see: https://wiki.php.net/rfc/jsond
-- old extension: old, no maintainer, not a free license
-- benchmarks: https://github.com/bukka/php-jsond-bench/blob/master/reports/0001/summary.md
REF: https://github.com/php/php-src/blob/php-7.0.0beta3/NEWS
REF: https://github.com/php/php-src/blob/php-7.0.0beta3/UPGRADING
REPO: https://github.com/dbierer/php7_examples.git
***** NEW ***********************************************************************
FEATURES:
\u{xxxxx} Unicode Codepoint Escape Syntax
error_clear_last()
zend_sort ???
SEARCH WebDav method
"v" DateTime format modifier to get the 3-digit version of fraction of seconds
experimental (disabled by default) file based opcode cache
"alpn_protocols" SSL context option allowing encrypted client/server streams to negotiate alternative protocols using the ALPN TLS extension when built against OpenSSL 1.0.2 or newer.
wifcontinued()
wcontinued()
ReflectionGenerator class
Zlib::deflate_init(), deflate_add(), inflate_init(), inflate_add() functions allowing incremental/streaming compression/decompression
OPERATORS:
??
$a <=> $b -- combined comparison ("spaceship") operator; returns -1, 0 or 1
CONSTANTS:
PHP_INT_MIN
DateTime::RFC3339_EXTENDED to output in RFC3339 Extended format which includes fraction of seconds
***** IMPROVED ******************************************************************
pcntl_wait() and pcntl_waitpid() -- Added rusage support
NULL byte protection to exec, system and passthru
unserialize() -- Added options parameter for allowing to specify acceptable classes
Closure::call() method
Reflection support for return types and type declarations.
getrusage() -- Added Windows support
ZipArchive -- added setCompressionName() and setCompressionIndex() methods
***** REMOVED *******************************************************************
RE: Removed SAPIs / not-yet-ported Extensions:
----------------------------------------------
(see: https://wiki.php.net/rfc/removal_of_dead_sapis_and_exts)
RE: ext/pdo_oci and ext/oci8
Dependency home: oracle.com
Dependency debian supported: no
Dependency last release: 2014
Christopher Jones stated these extensions to be supported by Oracle. Oracle plans to maintains them further in the core.
NOTE: These extensions was removed from the voting options, because they per the current info are going to be supported for PHP7 in the future.
RE: ext/pdo_dblib
Dependency home: sybase.com, microsoft.com
Dependency debian supported: no
Dependency last release: 2014
4 voted to remove, 18 voted to let it remain
RE: ext/mcrypt
Dependency home: http://sourceforge.net/projects/mcrypt/
Dependency debian supported: yes
Dependency last release: 2007
15 voted to remove, 18 voted to let it remain
RE: ext/imap
* Dependency home: http://www.washington.edu/imap/
* Dependency debian supported: yes
* Dependency last release: 2007
14 voted to remove, 19 voted to let it remain
To be accepted/declined each vote requires 50%+1 acceptance.