3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr[] = array('img' => "http://placehold.it/150x150", 'link' => '#1', 'text1' => "ONE 1", 'text2' => 'ONE 2'); $arr[] = array('img' => "http://placehold.it/200x150", 'link' => '#2', 'text1' => "TWO 1", 'text2' => 'TWO 2'); $arr[] = array('img' => "http://placehold.it/250x150", 'link' => '#3', 'text1' => "THREE 1", 'text2' => 'THREE 2'); $arr[] = array('img' => "http://placehold.it/300x150", 'link' => '#4', 'text1' => "FOUR 1", 'text2' => 'FOUR 2'); $arr[] = array('img' => "http://placehold.it/350x150", 'link' => '#5', 'text1' => "FIVE 1", 'text2' => 'FIVE 2'); $arr[] = array('img' => "http://placehold.it/400x150", 'link' => '#6', 'text1' => "SIX 1", 'text2' => 'SIX 2'); $arr[] = array('img' => "http://placehold.it/450x150", 'link' => '#7', 'text1' => "SEVEN 1", 'text2' => 'SEVEN 2'); foreach (array_rand($arr, 3) as $index) { $row = $arr[$index]; $row['img'] = "<img src=\"{$row['img']}\">"; echo '</p>' , implode('</p><p>', $row) , "</p><hr>\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 36
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 36
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/FRTdE
function name:  (null)
number of ops:  38
compiled vars:  !0 = $arr, !1 = $index, !2 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0
          1        OP_DATA                                                  <array>
    4     2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  <array>
    5     4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  <array>
    6     6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  <array>
    7     8        ASSIGN_DIM                                               !0
          9        OP_DATA                                                  <array>
    8    10        ASSIGN_DIM                                               !0
         11        OP_DATA                                                  <array>
    9    12        ASSIGN_DIM                                               !0
         13        OP_DATA                                                  <array>
   11    14        INIT_FCALL                                               'array_rand'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 3
         17        DO_ICALL                                         $10     
         18      > FE_RESET_R                                       $11     $10, ->36
         19    > > FE_FETCH_R                                               $11, !1, ->36
   12    20    >   FETCH_DIM_R                                      ~12     !0, !1
         21        ASSIGN                                                   !2, ~12
   13    22        ROPE_INIT                                     3  ~17     '%3Cimg+src%3D%22'
         23        FETCH_DIM_R                                      ~15     !2, 'img'
         24        ROPE_ADD                                      1  ~17     ~17, ~15
         25        ROPE_END                                      2  ~16     ~17, '%22%3E'
         26        ASSIGN_DIM                                               !2, 'img'
         27        OP_DATA                                                  ~16
   14    28        ECHO                                                     '%3C%2Fp%3E'
         29        INIT_FCALL                                               'implode'
         30        SEND_VAL                                                 '%3C%2Fp%3E%3Cp%3E'
         31        SEND_VAR                                                 !2
         32        DO_ICALL                                         $19     
         33        ECHO                                                     $19
         34        ECHO                                                     '%3C%2Fp%3E%3Chr%3E%0A'
   11    35      > JMP                                                      ->19
         36    >   FE_FREE                                                  $11
   15    37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.37 ms | 1396 KiB | 17 Q