3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = "<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> * (c) 2004-2006 Sean Kerr <sean@code-box.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * sfAction executes all the logic for the current request. * * @author Fabien Potencier <fabien.potencier@symfony-project.com> * @author Sean Kerr <sean@code-box.org> * * @method sfWebController getController() * @method sfWebResponse getResponse() */ abstract class sfAction extends sfComponent { protected \$security = []; /** * Initializes this action. * * @param sfContext \$context the current application context * @param string \$moduleName the module name * @param string \$actionName the action name */ public function initialize(\$context, \$moduleName, \$actionName) { parent::initialize(\$context, \$moduleName, \$actionName); // include security configuration if (\$file = \$context->getConfigCache()->checkConfig('modules/'.\$this->getModuleName().'/config/security.yml', true)) { require \$file; } } }"; $replaceRegex = '/^(?:<pre><code(?: [^>]+)?>|<code><span(?: [^>]+)?>\s*)(.*?)(?:<\/code><\/pre>|\s*<\/span>\s*<\/code>)$/s'; $splitRegex = '/(\r\n|\n|\r|<br \/>)/'; $content = preg_replace($replaceRegex, '$1', highlight_string($code, true)); $content = preg_split($splitRegex, $content); echo sprintf("Expected 41 lines, got %s lines\n\n", count($content)); $line = 37; $lines = []; for ($i = max($line - 3, 1), $max = min($line + 3, count($content)); $i <= $max; ++$i) { $lines[] = '<li'.($i == $line ? ' class="selected"' : '').'>'.$content[$i - 1].'</li>'; } echo '<ol start="'.max($line - 3, 1).'">'.implode("\n", $lines).'</ol>';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
2 jumps found. (Code = 44) Position 1 = 56, Position 2 = 40
Branch analysis from position: 56
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 44
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 56, Position 2 = 40
Branch analysis from position: 56
Branch analysis from position: 40
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 56, Position 2 = 40
Branch analysis from position: 56
Branch analysis from position: 40
filename:       /in/Wlrcv
function name:  (null)
number of ops:  71
compiled vars:  !0 = $code, !1 = $replaceRegex, !2 = $splitRegex, !3 = $content, !4 = $line, !5 = $lines, !6 = $i, !7 = $max
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fphp%0A%0A%2F%2A%0A+%2A+This+file+is+part+of+the+symfony+package.%0A+%2A+%28c%29+2004-2006+Fabien+Potencier+%3Cfabien.potencier%40symfony-project.com%3E%0A+%2A+%28c%29+2004-2006+Sean+Kerr+%3Csean%40code-box.org%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%0A%2F%2A%2A%0A+%2A+sfAction+executes+all+the+logic+for+the+current+request.%0A+%2A%0A+%2A+%40author+++++Fabien+Potencier+%3Cfabien.potencier%40symfony-project.com%3E%0A+%2A+%40author+++++Sean+Kerr+%3Csean%40code-box.org%3E%0A+%2A%0A+%2A+%40method+sfWebController+getController%28%29%0A+%2A+%40method+sfWebResponse+++getResponse%28%29%0A+%2A%2F%0Aabstract+class+sfAction+extends+sfComponent%0A%7B%0A++++protected+%24security+%3D+%5B%5D%3B%0A%0A++++%2F%2A%2A%0A+++++%2A+Initializes+this+action.%0A+++++%2A%0A+++++%2A+%40param+sfContext+%24context++++the+current+application+context%0A+++++%2A+%40param+string++++%24moduleName+the+module+name%0A+++++%2A+%40param+string++++%24actionName+the+action+name%0A+++++%2A%2F%0A++++public+function+initialize%28%24context%2C+%24moduleName%2C+%24actionName%29%0A++++%7B%0A++++++++parent%3A%3Ainitialize%28%24context%2C+%24moduleName%2C+%24actionName%29%3B%0A%0A++++++++%2F%2F+include+security+configuration%0A++++++++if+%28%24file+%3D+%24context-%3EgetConfigCache%28%29-%3EcheckConfig%28%27modules%2F%27.%24this-%3EgetModuleName%28%29.%27%2Fconfig%2Fsecurity.yml%27%2C+true%29%29+%7B%0A++++++++++++require+%24file%3B%0A++++++++%7D%0A++++%7D%0A%7D'
   45     1        ASSIGN                                                   !1, '%2F%5E%28%3F%3A%3Cpre%3E%3Ccode%28%3F%3A+%5B%5E%3E%5D%2B%29%3F%3E%7C%3Ccode%3E%3Cspan%28%3F%3A+%5B%5E%3E%5D%2B%29%3F%3E%5Cs%2A%29%28.%2A%3F%29%28%3F%3A%3C%5C%2Fcode%3E%3C%5C%2Fpre%3E%7C%5Cs%2A%3C%5C%2Fspan%3E%5Cs%2A%3C%5C%2Fcode%3E%29%24%2Fs'
   46     2        ASSIGN                                                   !2, '%2F%28%5Cr%5Cn%7C%5Cn%7C%5Cr%7C%3Cbr+%5C%2F%3E%29%2F'
   48     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 '%241'
          6        INIT_FCALL                                               'highlight_string'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $11     
         10        SEND_VAR                                                 $11
         11        DO_ICALL                                         $12     
         12        ASSIGN                                                   !3, $12
   49    13        INIT_FCALL                                               'preg_split'
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                         $14     
         17        ASSIGN                                                   !3, $14
   51    18        INIT_FCALL                                               'sprintf'
         19        SEND_VAL                                                 'Expected+41+lines%2C+got+%25s+lines%0A%0A'
         20        COUNT                                            ~16     !3
         21        SEND_VAL                                                 ~16
         22        DO_ICALL                                         $17     
         23        ECHO                                                     $17
   54    24        ASSIGN                                                   !4, 37
   55    25        ASSIGN                                                   !5, <array>
   56    26        INIT_FCALL                                               'max'
         27        SUB                                              ~20     !4, 3
         28        SEND_VAL                                                 ~20
         29        SEND_VAL                                                 1
         30        DO_ICALL                                         $21     
         31        ASSIGN                                                   !6, $21
         32        INIT_FCALL                                               'min'
         33        ADD                                              ~23     !4, 3
         34        SEND_VAL                                                 ~23
         35        COUNT                                            ~24     !3
         36        SEND_VAL                                                 ~24
         37        DO_ICALL                                         $25     
         38        ASSIGN                                                   !7, $25
         39      > JMP                                                      ->54
   57    40    >   IS_EQUAL                                                 !6, !4
         41      > JMPZ                                                     ~28, ->44
         42    >   QM_ASSIGN                                        ~29     '+class%3D%22selected%22'
         43      > JMP                                                      ->45
         44    >   QM_ASSIGN                                        ~29     ''
         45    >   CONCAT                                           ~30     '%3Cli', ~29
         46        CONCAT                                           ~31     ~30, '%3E'
         47        SUB                                              ~32     !6, 1
         48        FETCH_DIM_R                                      ~33     !3, ~32
         49        CONCAT                                           ~34     ~31, ~33
         50        CONCAT                                           ~35     ~34, '%3C%2Fli%3E'
         51        ASSIGN_DIM                                               !5
         52        OP_DATA                                                  ~35
   56    53        PRE_INC                                                  !6
         54    >   IS_SMALLER_OR_EQUAL                                      !6, !7
         55      > JMPNZ                                                    ~37, ->40
   60    56    >   INIT_FCALL                                               'max'
         57        SUB                                              ~38     !4, 3
         58        SEND_VAL                                                 ~38
         59        SEND_VAL                                                 1
         60        DO_ICALL                                         $39     
         61        CONCAT                                           ~40     '%3Col+start%3D%22', $39
         62        CONCAT                                           ~41     ~40, '%22%3E'
         63        INIT_FCALL                                               'implode'
         64        SEND_VAL                                                 '%0A'
         65        SEND_VAR                                                 !5
         66        DO_ICALL                                         $42     
         67        CONCAT                                           ~43     ~41, $42
         68        CONCAT                                           ~44     ~43, '%3C%2Fol%3E'
         69        ECHO                                                     ~44
         70      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
208.72 ms | 1017 KiB | 20 Q