3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array("apple", "", 2, null, -5, "orange", 10, false, "",22); $filteredX = array_filter($x); var_dump($filteredX); echo "<br/>"; $m = [12,13,14,15,16,17,18,19,20,21]; $k = array_map(null, $filteredX, $m); $filteredK = array_filter($k, function($v) { return isset($v[0], $v[1]);}); shuffle($filteredK); $count = 1; foreach ($filteredK as $a) { if($count <= 8){ echo "The number is: $a[0]. $a[1]. <br>"; }else{ break; } $count++; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 42
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 42
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 39
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
Branch analysis from position: 42
filename:       /in/B9WJ0
function name:  (null)
number of ops:  44
compiled vars:  !0 = $x, !1 = $filteredX, !2 = $m, !3 = $k, !4 = $filteredK, !5 = $count, !6 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $8      
          4        ASSIGN                                                   !1, $8
    6     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    8     8        ECHO                                                     '%3Cbr%2F%3E'
   10     9        ASSIGN                                                   !2, <array>
   12    10        INIT_FCALL                                               'array_map'
         11        SEND_VAL                                                 null
         12        SEND_VAR                                                 !1
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $12     
         15        ASSIGN                                                   !3, $12
   13    16        INIT_FCALL                                               'array_filter'
         17        SEND_VAR                                                 !3
         18        DECLARE_LAMBDA_FUNCTION                          ~14     [0]
         19        SEND_VAL                                                 ~14
         20        DO_ICALL                                         $15     
         21        ASSIGN                                                   !4, $15
   15    22        INIT_FCALL                                               'shuffle'
         23        SEND_REF                                                 !4
         24        DO_ICALL                                                 
   17    25        ASSIGN                                                   !5, 1
   18    26      > FE_RESET_R                                       $19     !4, ->42
         27    > > FE_FETCH_R                                               $19, !6, ->42
   19    28    >   IS_SMALLER_OR_EQUAL                                      !5, 8
         29      > JMPZ                                                     ~20, ->39
   20    30    >   ROPE_INIT                                     5  ~24     'The+number+is%3A+'
         31        FETCH_DIM_R                                      ~21     !6, 0
         32        ROPE_ADD                                      1  ~24     ~24, ~21
         33        ROPE_ADD                                      2  ~24     ~24, '.+'
         34        FETCH_DIM_R                                      ~22     !6, 1
         35        ROPE_ADD                                      3  ~24     ~24, ~22
         36        ROPE_END                                      4  ~23     ~24, '.+%3Cbr%3E'
         37        ECHO                                                     ~23
   19    38      > JMP                                                      ->40
   22    39    > > JMP                                                      ->42
   24    40    >   PRE_INC                                                  !5
   18    41      > JMP                                                      ->27
         42    >   FE_FREE                                                  $19
   25    43      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/B9WJ0
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        ISSET_ISEMPTY_DIM_OBJ                         0  ~1      !0, 0
          2      > JMPZ_EX                                          ~1      ~1, ->5
          3    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~2      !0, 1
          4        BOOL                                             ~1      ~2
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142 ms | 1006 KiB | 17 Q