3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'abclkjabc'; echo count(array_filter(count_chars($string, 1), fn($count) => $count === 1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mpcec
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'abclkjabc'
    4     1        INIT_FCALL                                                   'array_filter'
          2        INIT_FCALL                                                   'count_chars'
          3        SEND_VAR                                                     !0
          4        SEND_VAL                                                     1
          5        DO_ICALL                                             $2      
          6        SEND_VAR                                                     $2
          7        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          8        SEND_VAL                                                     ~3
          9        DO_ICALL                                             $4      
         10        COUNT                                                ~5      $4
         11        ECHO                                                         ~5
         12      > 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/Mpcec
function name:  {closure:/in/Mpcec:4}
number of ops:  4
compiled vars:  !0 = $count
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
          0  E >   RECV                                                 !0      
          1        IS_IDENTICAL                                         ~1      !0, 1
          2      > RETURN                                                       ~1
          3*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
219.41 ms | 1849 KiB | 15 Q