3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1, "apples",2, "oranges",3, "plums"); $filtered = array_filter($array, 'ctype_alpha'); $callback = function($item) { return strtoupper($item); }; $nu = array_map( "strtoupper", $filtered); var_dump($nu); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r8Cve
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array, !1 = $filtered, !2 = $callback, !3 = $nu
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'ctype_alpha'
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        DECLARE_LAMBDA_FUNCTION                          ~7      [0]
          7        ASSIGN                                                   !2, ~7
    9     8        INIT_FCALL                                               'array_map'
          9        SEND_VAL                                                 'strtoupper'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !3, $9
   10    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                                 
   11    16      > 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/r8Cve
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'strtoupper'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
    7     5*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.56 ms | 1446 KiB | 17 Q