3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_filter_strlen($a, $l) { $a = preg_replace("/^.{0,$l}$/u", '', $a); $a = array_filter($a, 'strlen'); return $a; } print_r(array_filter_strlen(array('привет', 'mir', 'i', 'cyberforum'), 3));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bvSBk
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'array_filter_strlen'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 3
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function array_filter_strlen:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bvSBk
function name:  array_filter_strlen
number of ops:  18
compiled vars:  !0 = $a, !1 = $l
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'preg_replace'
          3        ROPE_INIT                                     3  ~3      '%2F%5E.%7B0%2C'
          4        ROPE_ADD                                      1  ~3      ~3, !1
          5        ROPE_END                                      2  ~2      ~3, '%7D%24%2Fu'
          6        SEND_VAL                                                 ~2
          7        SEND_VAL                                                 ''
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !0, $5
    5    11        INIT_FCALL                                               'array_filter'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 'strlen'
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !0, $7
    6    16      > RETURN                                                   !0
    7    17*     > RETURN                                                   null

End of function array_filter_strlen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.48 ms | 1398 KiB | 20 Q