3v4l.org

run code in 300+ PHP versions simultaneously
<?php // inside index.php $extra_scripts = ['file03.js']; ?> // now moving into header.php <?php $import_scripts = array_merge(array( 'file01.js', 'file02.js' ), $extra_scripts ?? []); ?> <!DOCTYPE html> <html> <head> <!-- Scripts Section --> <?php foreach ($import_scripts as $script) { echo '<script src="' . $script . '"></script>' . PHP_EOL; } ?><title>Demo</title> </head> <body> <p>Blog</p>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/Ilf9j
function name:  (null)
number of ops:  20
compiled vars:  !0 = $extra_scripts, !1 = $import_scripts, !2 = $script
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ECHO                                                     '%2F%2F+now+moving+into+header.php%0A'
    7     2        INIT_FCALL                                               'array_merge'
    8     3        SEND_VAL                                                 <array>
   10     4        COALESCE                                         ~4      !0
          5        QM_ASSIGN                                        ~4      <array>
          6        SEND_VAL                                                 ~4
    7     7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
   13     9        ECHO                                                     '%3C%21DOCTYPE+html%3E%0A++%3Chtml%3E%0A++++%3Chead%3E%0A++++++%3C%21--+Scripts+Section+--%3E%0A'
   18    10      > FE_RESET_R                                       $7      !1, ->17
         11    > > FE_FETCH_R                                               $7, !2, ->17
   19    12    >   CONCAT                                           ~8      '%3Cscript+src%3D%22', !2
         13        CONCAT                                           ~9      ~8, '%22%3E%3C%2Fscript%3E'
         14        CONCAT                                           ~10     ~9, '%0A'
         15        ECHO                                                     ~10
   18    16      > JMP                                                      ->11
         17    >   FE_FREE                                                  $7
   21    18        ECHO                                                     '%3Ctitle%3EDemo%3C%2Ftitle%3E%0A++++%3C%2Fhead%3E%0A++++%3Cbody%3E%0A++++++%3Cp%3EBlog%3C%2Fp%3E'
   24    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.26 ms | 1002 KiB | 14 Q