3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code =<<<EOC <?php /* * This file is part of the Redaktilo project. * * (c) Loïc Chardonnet <loic.chardonnet@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Gnugat\Redaktilo\Replace; use Gnugat\Redaktilo\Converter\LineContentConverter; use Gnugat\Redaktilo\File; /** * This strategy manipulates lines stripped of their line break character. * * @api */ class LineReplaceStrategy implements ReplaceStrategy { /** @var LineContentConverter */ private $converter; /** @param LineContentConverter */ public function __construct(LineContentConverter $converter) { $this->converter = $converter; } /** {@inheritdoc} */ public function supports($location) { return (is_int($location) && $location >= 0); } /** {@inheritdoc} */ public function removeAt(File $file, $location) { $lines = $this->converter->from($file); unset($lines[$location]); $this->converter->back($file, $lines); } /** {@inheritdoc} */ public function replaceWith(File $file, $location, $replacement) { $lines = $this->converter->from($file); $lines[$location] = $replacement; $this->converter->back($file, $lines); } /** {@inheritdoc} */ public function insertAt(File $file, $location, $addition) { $lines = $this->converter->from($file); array_splice($lines, $location, 0, $addition); $this->converter->back($file, $lines); } } EOC; var_dump(token_get_all($code));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/krfId
function name:  (null)
number of ops:  103
compiled vars:  !0 = $code, !1 = $converter, !2 = $location, !3 = $file, !4 = $lines, !5 = $replacement, !6 = $addition
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ROPE_INIT                                    79  ~24     '%3C%3Fphp%0A%0A%2F%2A%0A+%2A+This+file+is+part+of+the+Redaktilo+project.%0A+%2A%0A+%2A+%28c%29+Lo%C3%AFc+Chardonnet+%3Cloic.chardonnet%40gmail.com%3E%0A+%2A%0A+%2A+For+the+full+copyright+and+license+information%2C+please+view+the+LICENSE%0A+%2A+file+that+was+distributed+with+this+source+code.%0A+%2A%2F%0A%0Anamespace+Gnugat%5CRedaktilo%5CReplace%3B%0A%0Ause+Gnugat%5CRedaktilo%5CConverter%5CLineContentConverter%3B%0Ause+Gnugat%5CRedaktilo%5CFile%3B%0A%0A%2F%2A%2A%0A+%2A+This+strategy+manipulates+lines+stripped+of+their+line+break+character.%0A+%2A%0A+%2A+%40api%0A+%2A%2F%0Aclass+LineReplaceStrategy+implements+ReplaceStrategy%0A%7B%0A++++%2F%2A%2A+%40var+LineContentConverter+%2A%2F%0A++++private+'
   28     1        ROPE_ADD                                      1  ~24     ~24, !1
          2        ROPE_ADD                                      2  ~24     ~24, '%3B%0A%0A++++%2F%2A%2A+%40param+LineContentConverter+%2A%2F%0A++++public+function+__construct%28LineContentConverter+'
   31     3        ROPE_ADD                                      3  ~24     ~24, !1
          4        ROPE_ADD                                      4  ~24     ~24, '%29%0A++++%7B%0A++++++++'
   33     5        FETCH_THIS                                       $7      
          6        FETCH_OBJ_R                                      ~8      $7, 'converter'
          7        ROPE_ADD                                      5  ~24     ~24, ~8
          8        ROPE_ADD                                      6  ~24     ~24, '+%3D+'
          9        ROPE_ADD                                      7  ~24     ~24, !1
         10        ROPE_ADD                                      8  ~24     ~24, '%3B%0A++++%7D%0A%0A++++%2F%2A%2A+%7B%40inheritdoc%7D+%2A%2F%0A++++public+function+supports%28'
   37    11        ROPE_ADD                                      9  ~24     ~24, !2
         12        ROPE_ADD                                     10  ~24     ~24, '%29%0A++++%7B%0A++++++++return+%28is_int%28'
   39    13        ROPE_ADD                                     11  ~24     ~24, !2
         14        ROPE_ADD                                     12  ~24     ~24, '%29+%26%26+'
         15        ROPE_ADD                                     13  ~24     ~24, !2
         16        ROPE_ADD                                     14  ~24     ~24, '+%3E%3D+0%29%3B%0A++++%7D%0A%0A++++%2F%2A%2A+%7B%40inheritdoc%7D+%2A%2F%0A++++public+function+removeAt%28File+'
   43    17        ROPE_ADD                                     15  ~24     ~24, !3
         18        ROPE_ADD                                     16  ~24     ~24, '%2C+'
         19        ROPE_ADD                                     17  ~24     ~24, !2
         20        ROPE_ADD                                     18  ~24     ~24, '%29%0A++++%7B%0A++++++++'
   45    21        ROPE_ADD                                     19  ~24     ~24, !4
         22        ROPE_ADD                                     20  ~24     ~24, '+%3D+'
         23        FETCH_THIS                                       $9      
         24        FETCH_OBJ_R                                      ~10     $9, 'converter'
         25        ROPE_ADD                                     21  ~24     ~24, ~10
         26        ROPE_ADD                                     22  ~24     ~24, '-%3Efrom%28'
         27        ROPE_ADD                                     23  ~24     ~24, !3
         28        ROPE_ADD                                     24  ~24     ~24, '%29%3B%0A++++++++unset%28'
   46    29        FETCH_DIM_R                                      ~11     !4, !2
         30        ROPE_ADD                                     25  ~24     ~24, ~11
         31        ROPE_ADD                                     26  ~24     ~24, '%29%3B%0A++++++++'
   47    32        FETCH_THIS                                       $12     
         33        FETCH_OBJ_R                                      ~13     $12, 'converter'
         34        ROPE_ADD                                     27  ~24     ~24, ~13
         35        ROPE_ADD                                     28  ~24     ~24, '-%3Eback%28'
         36        ROPE_ADD                                     29  ~24     ~24, !3
         37        ROPE_ADD                                     30  ~24     ~24, '%2C+'
         38        ROPE_ADD                                     31  ~24     ~24, !4
         39        ROPE_ADD                                     32  ~24     ~24, '%29%3B%0A++++%7D%0A%0A++++%2F%2A%2A+%7B%40inheritdoc%7D+%2A%2F%0A++++public+function+replaceWith%28File+'
   51    40        ROPE_ADD                                     33  ~24     ~24, !3
         41        ROPE_ADD                                     34  ~24     ~24, '%2C+'
         42        ROPE_ADD                                     35  ~24     ~24, !2
         43        ROPE_ADD                                     36  ~24     ~24, '%2C+'
         44        ROPE_ADD                                     37  ~24     ~24, !5
         45        ROPE_ADD                                     38  ~24     ~24, '%29%0A++++%7B%0A++++++++'
   53    46        ROPE_ADD                                     39  ~24     ~24, !4
         47        ROPE_ADD                                     40  ~24     ~24, '+%3D+'
         48        FETCH_THIS                                       $14     
         49        FETCH_OBJ_R                                      ~15     $14, 'converter'
         50        ROPE_ADD                                     41  ~24     ~24, ~15
         51        ROPE_ADD                                     42  ~24     ~24, '-%3Efrom%28'
         52        ROPE_ADD                                     43  ~24     ~24, !3
         53        ROPE_ADD                                     44  ~24     ~24, '%29%3B%0A++++++++'
   54    54        FETCH_DIM_R                                      ~16     !4, !2
         55        ROPE_ADD                                     45  ~24     ~24, ~16
         56        ROPE_ADD                                     46  ~24     ~24, '+%3D+'
         57        ROPE_ADD                                     47  ~24     ~24, !5
         58        ROPE_ADD                                     48  ~24     ~24, '%3B%0A++++++++'
   55    59        FETCH_THIS                                       $17     
         60        FETCH_OBJ_R                                      ~18     $17, 'converter'
         61        ROPE_ADD                                     49  ~24     ~24, ~18
         62        ROPE_ADD                                     50  ~24     ~24, '-%3Eback%28'
         63        ROPE_ADD                                     51  ~24     ~24, !3
         64        ROPE_ADD                                     52  ~24     ~24, '%2C+'
         65        ROPE_ADD                                     53  ~24     ~24, !4
         66        ROPE_ADD                                     54  ~24     ~24, '%29%3B%0A++++%7D%0A%0A++++%2F%2A%2A+%7B%40inheritdoc%7D+%2A%2F%0A++++public+function+insertAt%28File+'
   59    67        ROPE_ADD                                     55  ~24     ~24, !3
         68        ROPE_ADD                                     56  ~24     ~24, '%2C+'
         69        ROPE_ADD                                     57  ~24     ~24, !2
         70        ROPE_ADD                                     58  ~24     ~24, '%2C+'
         71        ROPE_ADD                                     59  ~24     ~24, !6
         72        ROPE_ADD                                     60  ~24     ~24, '%29%0A++++%7B%0A++++++++'
   61    73        ROPE_ADD                                     61  ~24     ~24, !4
         74        ROPE_ADD                                     62  ~24     ~24, '+%3D+'
         75        FETCH_THIS                                       $19     
         76        FETCH_OBJ_R                                      ~20     $19, 'converter'
         77        ROPE_ADD                                     63  ~24     ~24, ~20
         78        ROPE_ADD                                     64  ~24     ~24, '-%3Efrom%28'
         79        ROPE_ADD                                     65  ~24     ~24, !3
         80        ROPE_ADD                                     66  ~24     ~24, '%29%3B%0A++++++++array_splice%28'
   62    81        ROPE_ADD                                     67  ~24     ~24, !4
         82        ROPE_ADD                                     68  ~24     ~24, '%2C+'
         83        ROPE_ADD                                     69  ~24     ~24, !2
         84        ROPE_ADD                                     70  ~24     ~24, '%2C+0%2C+'
         85        ROPE_ADD                                     71  ~24     ~24, !6
         86        ROPE_ADD                                     72  ~24     ~24, '%29%3B%0A++++++++'
   63    87        FETCH_THIS                                       $21     
         88        FETCH_OBJ_R                                      ~22     $21, 'converter'
         89        ROPE_ADD                                     73  ~24     ~24, ~22
         90        ROPE_ADD                                     74  ~24     ~24, '-%3Eback%28'
         91        ROPE_ADD                                     75  ~24     ~24, !3
         92        ROPE_ADD                                     76  ~24     ~24, '%2C+'
         93        ROPE_ADD                                     77  ~24     ~24, !4
         94        ROPE_END                                     78  ~23     ~24, '%29%3B%0A++++%7D%0A%7D%0A'
    3    95        ASSIGN                                                   !0, ~23
   69    96        INIT_FCALL                                               'var_dump'
         97        INIT_FCALL                                               'token_get_all'
         98        SEND_VAR                                                 !0
         99        DO_ICALL                                         $65     
        100        SEND_VAR                                                 $65
        101        DO_ICALL                                                 
        102      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.07 ms | 1404 KiB | 17 Q