3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $processor = function ($data) { $data = htmlentities($data); $data = str_split($data); $data = (fn ($x) => array_map(strtoupper(...), $x))($data); $data = (fn ($x) => array_filter($x, fn ($v) => $v != 'O'))($data); return $data; }; $data = "Hello World!"; var_dump( $data, $processor($data), );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jY0Vg
function name:  (null)
number of ops:  11
compiled vars:  !0 = $processor, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          1        ASSIGN                                                   !0, ~2
   14     2        ASSIGN                                                   !1, 'Hello+World%21'
   16     3        INIT_FCALL                                               'var_dump'
   17     4        SEND_VAR                                                 !1
   18     5        INIT_DYNAMIC_CALL                                        !0
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
   16     9        DO_ICALL                                                 
   19    10      > 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/jY0Vg
function name:  {closure}
number of ops:  22
compiled vars:  !0 = $data, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'htmlentities'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    7     5        INIT_FCALL                                               'str_split'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !0, $4
    8     9        DECLARE_LAMBDA_FUNCTION                          ~6      [0]
         10        INIT_DYNAMIC_CALL                                        ~6
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $7      
         13        ASSIGN                                                   !0, $7
    9    14        DECLARE_LAMBDA_FUNCTION                          ~9      [1]
         15        BIND_LEXICAL                                             ~9, !1
         16        INIT_DYNAMIC_CALL                                        ~9
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0  $10     
         19        ASSIGN                                                   !0, $10
   10    20      > RETURN                                                   !0
   11    21*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jY0Vg
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'array_map'
          2        INIT_FCALL                                               'strtoupper'
          3        ZEND_CALLABLE_CONVERT                            ~1      
          4        SEND_VAL                                                 ~1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
          8*     > 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/jY0Vg
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $x, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7      > RETURN                                                   $3
          8*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jY0Vg
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        IS_NOT_EQUAL                                     ~1      !0, 'O'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of Dynamic Function 0

End of Dynamic Function 1

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.1 ms | 1008 KiB | 19 Q