3v4l.org

run code in 300+ PHP versions simultaneously
<?php // I just killed one unicorn. [*] $_POST = array(); foreach ( range(1, 99) as $index ) { $_POST[ 'a'. $index ] = $index; } $find = "18"; $finded = array_filter($_POST, function($index) use ($find) { return (strpos($index,$find) !== false ) ? 1 : 0 ; },ARRAY_FILTER_USE_KEY); print_r($finded);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/lF7pF
function name:  (null)
number of ops:  28
compiled vars:  !0 = $index, !1 = $find, !2 = $finded
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_W                      global              $3      '_POST'
          1        ASSIGN                                                   $3, <array>
    6     2        INIT_FCALL                                               'range'
          3        SEND_VAL                                                 1
          4        SEND_VAL                                                 99
          5        DO_ICALL                                         $5      
          6      > FE_RESET_R                                       $6      $5, ->13
          7    > > FE_FETCH_R                                               $6, !0, ->13
    7     8    >   CONCAT                                           ~8      'a', !0
          9        FETCH_W                      global              $7      '_POST'
         10        ASSIGN_DIM                                               $7, ~8
         11        OP_DATA                                                  !0
    6    12      > JMP                                                      ->7
         13    >   FE_FREE                                                  $6
   11    14        ASSIGN                                                   !1, '18'
   13    15        INIT_FCALL                                               'array_filter'
         16        FETCH_R                      global              ~11     '_POST'
         17        SEND_VAL                                                 ~11
         18        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FlF7pF%3A13%240'
         19        BIND_LEXICAL                                             ~12, !1
   15    20        SEND_VAL                                                 ~12
         21        SEND_VAL                                                 2
         22        DO_ICALL                                         $13     
   13    23        ASSIGN                                                   !2, $13
   17    24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FlF7pF%3A13%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lF7pF
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $index, !1 = $find
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   14     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6        TYPE_CHECK                                  1018          $2
          7      > JMPZ                                                     ~3, ->10
          8    >   QM_ASSIGN                                        ~4      1
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~4      0
         11    > > RETURN                                                   ~4
   15    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FlF7pF%3A13%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.72 ms | 1405 KiB | 21 Q