3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo 'CURRENT: '.current( array_filter([3=>'three',7=>'seven'], function($e){ return stripos($e,'ee'); } ) ).PHP_EOL; echo 'RESET: '.reset( array_filter([3=>'three',7=>'seven'], function($e){ return stripos($e,'ee'); } ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sUrcB
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'current'
    4     1        INIT_FCALL                                                   'array_filter'
          2        SEND_VAL                                                     <array>
    5     3        DECLARE_LAMBDA_FUNCTION                              ~0      [0]
    7     4        SEND_VAL                                                     ~0
    4     5        DO_ICALL                                             $1      
    7     6        SEND_VAR                                                     $1
    3     7        DO_ICALL                                             $2      
    7     8        CONCAT                                               ~3      'CURRENT%3A+', $2
    9     9        CONCAT                                               ~4      ~3, '%0A'
         10        ECHO                                                         ~4
   10    11        INIT_FCALL                                                   'reset'
   11    12        INIT_FCALL                                                   'array_filter'
         13        SEND_VAL                                                     <array>
   12    14        DECLARE_LAMBDA_FUNCTION                              ~5      [1]
   14    15        SEND_VAL                                                     ~5
   11    16        DO_ICALL                                             $6      
   14    17        SEND_VAR_NO_REF                                   0          $6
   10    18        DO_ICALL                                             $7      
   14    19        CONCAT                                               ~8      'RESET%3A+', $7
         20        ECHO                                                         ~8
   16    21      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sUrcB
function name:  {closure:/in/sUrcB:5}
number of ops:  7
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    6     1        INIT_FCALL                                                   'stripos'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     'ee'
          4        DO_ICALL                                             $1      
          5      > RETURN                                                       $1
    7     6*     > RETURN                                                       null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sUrcB
function name:  {closure:/in/sUrcB:12}
number of ops:  7
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
   13     1        INIT_FCALL                                                   'stripos'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     'ee'
          4        DO_ICALL                                             $1      
          5      > RETURN                                                       $1
   14     6*     > RETURN                                                       null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.73 ms | 2616 KiB | 17 Q