com presentations: Deepdive version #1: deepdive-phpday19.xml slides/internals/exercise-short-open-tag.xml slides/mongodb/me.xml
[email protected] (Derick Rethans) Tue, 07 May 2019 20:22:53 +0000
| Newsgroups | php.pres |
|---|---|
| Message-ID | <[email protected]> |
Commit: 4814145c7868838cf8bb91619441a49be7deaa7d Author: Derick Rethans <[email protected]> Tue, 7 May 2019 21:22:33 +0100 Parents: 27105a66aec6c7ff45fd47ef9c43a81c29edcf0b Branches: master Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=4814145c7868838cf8bb91619441a49be7deaa7d Log: Deepdive version #1 Bugs: https://bugs.php.net/1 Changed paths: A deepdive-phpday19.xml A slides/internals/exercise-short-open-tag.xml M slides/mongodb/me.xml Diff: diff --git a/deepdive-phpday19.xml b/deepdive-phpday19.xml new file mode 100644 index 0000000..4702d21 --- /dev/null +++ b/deepdive-phpday19.xml @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<presentation css="10gen-strict.css"> +<topic>PHP</topic> +<title>PHP Deep Dive</title> +<event>phpDay 2019</event> +<location>Verona, Italy</location> +<date>May 11th, 2019</date> +<speaker>Derick Rethans</speaker> +<email>[email protected]</email> +<twitter>derickr</twitter> +<joindin>https://joind.in/XXXXX</joindin> + +<slide>slides/mongodb/title.xml</slide> +<slide>slides/mongodb/me.xml</slide> + +<slide>slides/internals/title-agenda.xml</slide> + +<slide>slides/internals/title-stages.xml</slide> +<!-- INTRODUCTION +Compile stages: +Parse script +Create AST +Convert to opcodes +Run the code +Opcache for caching +--> +<slide>slides/internals/stages.xml</slide> + +<!-- STAGES +Parse +- Show parser rules +- Show "compiler" rules +--> + +<slide>slides/internals/title-parsing.xml</slide> +<slide>slides/internals/parse-state-machine.xml</slide> +<slide>slides/internals/parse-tokenization.xml</slide> +<slide>slides/internals/scanner.xml</slide> +<slide>slides/internals/scanner-rules.xml</slide> + +<!-- EXERCISE: SHORT OPEN TAG --> +<slide>slides/internals/exercise-short-open-tag.xml</slide> + +<slide>slides/internals/ast.xml</slide> +<slide>slides/internals/ast1.xml</slide> +<slide>slides/internals/scanner-ast.xml</slide> +<slide>slides/internals/scanner-ast2.xml</slide> +<slide>slides/internals/bytecode0.xml</slide> +<slide>slides/internals/bytecode½.xml</slide> +<slide>slides/internals/bytecode1.xml</slide> + +<slide>slides/internals/jumps.xml</slide> + +<!-- +AST +- Show AST for various control structures + +Opcodes +- Show AST for the same control structures +--> + +<slide>slides/internals/jumps-if.xml</slide> +<slide>slides/internals/jumps-if-else.xml</slide> + +<slide>slides/internals/rings.xml</slide> +<slide>slides/internals/jumps-for.xml</slide> +<slide>slides/internals/jumps-for-rewritten.xml</slide> +<slide>slides/internals/jumps-while.xml</slide> +<slide>slides/internals/jumps-do-while.xml</slide> +<slide>slides/internals/jumps-foreach.xml</slide> +<slide>slides/internals/jumps-complex.xml</slide> +<slide>slides/internals/loops.xml</slide> +<slide>slides/internals/jumps-complex-dot.xml</slide> + +<!-- +Try/Catch nonsense +- FASTCALL/FASTRET +--> +<slide>slides/internals/catch.xml</slide> +<slide>slides/internals/jumps-try-catch.xml</slide> + +<!-- +Dead code analysis +- Show how Xdebug does it through VLD +--> +<slide>slides/internals/deadcode.xml</slide> +<slide>slides/internals/deadcode-vld.xml</slide> + +<!-- +Path analysis +- Branch and Path +--> +<slide>slides/internals/branches.xml</slide> +<slide>slides/xdebug/vld-path-2-paths.xml</slide> +<slide>slides/xdebug/vld-path-4-code.xml</slide> +<slide>slides/xdebug/vld-path-4-output.xml</slide> + +<slide>slides/xdebug/vld-path-3-code.xml</slide> +<slide>slides/xdebug/vld-path-3-output.xml</slide> +<slide>slides/xdebug/vld-path-3-paths.xml</slide> + +<!-- Conclusion + +Code -> Tokens -> AST -> opode + +Transformation of control structures + +Useful implementations + +--> +<slide>slides/internals/recap.xml</slide> +<slide>slides/internals/recap-content.xml</slide> + + + +<slide>slides/mongodb/questions.xml</slide> + +<slide>slides/mongodb/resources.xml</slide> + +</presentation> diff --git a/slides/internals/exercise-short-open-tag.xml b/slides/internals/exercise-short-open-tag.xml new file mode 100644 index 0000000..4c1709c --- /dev/null +++ b/slides/internals/exercise-short-open-tag.xml @@ -0,0 +1,29 @@ +<slide> +<title>Exercise: Deprecate Short Open Tags</title> + +<blurb>Compiling PHP:</blurb> +<example> +./buildconf +./configure --disable-all --prefix=/usr/local/php/deep-dive +make clean && make -j 4 && make install +</example> + +<blurb>In %Zend/zend_language_scanner.l%, find:</blurb> +<example><![CDATA[<INITIAL>"<?" { + if (CG(short_tags)) { + BEGIN(ST_IN_SCRIPTING); + if (PARSER_MODE()) { + SKIP_TOKEN(T_OPEN_TAG); + } + RETURN_TOKEN(T_OPEN_TAG); + } else { + goto inline_char_handler; + } +} +]]></example> + +<blurb>Make it an error with:</blurb> +<example> +zend_error(E_COMPILE_ERROR, "Short Open Tags are no more on line %d", CG(zend_lineno)); +</example> +</slide> diff --git a/slides/mongodb/me.xml b/slides/mongodb/me.xml index 448be72..7968048 100644 --- a/slides/mongodb/me.xml +++ b/slides/mongodb/me.xml @@ -9,6 +9,7 @@ <bullet>I'm European, living in London</bullet> <bullet>I work on *PHP things*</bullet> <bullet>*Xdebug* & PHP's Date/Time support</bullet> + <bullet>Host of *https://phpinternals.news* podcast</bullet> <bullet>I ♥🌍 maps, I ♥🍺 beer, I ♥🥃 whisky</bullet> <bullet>twitter: @derickr</bullet> </list>