3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_story = [ 'some-video.mp4', 'some-image.jpg' ]; foreach ($_story as $story) { $check = '/mp4/m'; preg_match_all($check, $story, $matches, PREG_SET_ORDER, 0); if (empty($matches)) { echo "<a href=$story&dl=1><img src=$story></a>\n"; } else { echo '<video width="320" height="240" controls>'."\n"; echo '<source src="' . $story . '" type="video/mp4">'."\n"; echo '</video>'."\n"; echo "<a href=$story&dl=1>Download</a>"."\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 32
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 32
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/mXJvA
function name:  (null)
number of ops:  34
compiled vars:  !0 = $_story, !1 = $story, !2 = $check, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1      > FE_RESET_R                                       $5      !0, ->32
          2    > > FE_FETCH_R                                               $5, !1, ->32
    9     3    >   ASSIGN                                                   !2, '%2Fmp4%2Fm'
   10     4        INIT_FCALL                                               'preg_match_all'
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !1
          7        SEND_REF                                                 !3
          8        SEND_VAL                                                 2
          9        SEND_VAL                                                 0
         10        DO_ICALL                                                 
   11    11        ISSET_ISEMPTY_CV                                         !3
         12      > JMPZ                                                     ~8, ->20
   12    13    >   ROPE_INIT                                     5  ~10     '%3Ca+href%3D'
         14        ROPE_ADD                                      1  ~10     ~10, !1
         15        ROPE_ADD                                      2  ~10     ~10, '%26dl%3D1%3E%3Cimg+src%3D'
         16        ROPE_ADD                                      3  ~10     ~10, !1
         17        ROPE_END                                      4  ~9      ~10, '%3E%3C%2Fa%3E%0A'
         18        ECHO                                                     ~9
         19      > JMP                                                      ->31
   14    20    >   ECHO                                                     '%3Cvideo+width%3D%22320%22+height%3D%22240%22+controls%3E%0A'
   15    21        CONCAT                                           ~13     '%3Csource+src%3D%22', !1
         22        CONCAT                                           ~14     ~13, '%22+type%3D%22video%2Fmp4%22%3E'
         23        CONCAT                                           ~15     ~14, '%0A'
         24        ECHO                                                     ~15
   16    25        ECHO                                                     '%3C%2Fvideo%3E%0A'
   17    26        ROPE_INIT                                     3  ~17     '%3Ca+href%3D'
         27        ROPE_ADD                                      1  ~17     ~17, !1
         28        ROPE_END                                      2  ~16     ~17, '%26dl%3D1%3EDownload%3C%2Fa%3E'
         29        CONCAT                                           ~19     ~16, '%0A'
         30        ECHO                                                     ~19
    8    31    > > JMP                                                      ->2
         32    >   FE_FREE                                                  $5
   19    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.25 ms | 1396 KiB | 15 Q