3v4l.org

run code in 300+ PHP versions simultaneously
<?php $signum = 15; var_dump( current( array_flip( array_filter( get_defined_constants(true)['pcntl'], fn($value, $name) => preg_match("/^SIG[A-Z]/", $name) && $value == $signum, ARRAY_FILTER_USE_BOTH ) ) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mk9F4
function name:  (null)
number of ops:  22
compiled vars:  !0 = $signum
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 15
    4     1        INIT_FCALL                                               'var_dump'
    5     2        INIT_FCALL                                               'current'
    6     3        INIT_FCALL                                               'array_flip'
    7     4        INIT_FCALL                                               'array_filter'
    8     5        INIT_FCALL                                               'get_defined_constants'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $2      
          8        FETCH_DIM_R                                      ~3      $2, 'pcntl'
          9        SEND_VAL                                                 ~3
    9    10        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
         11        BIND_LEXICAL                                             ~4, !0
         12        SEND_VAL                                                 ~4
   10    13        SEND_VAL                                                 1
    7    14        DO_ICALL                                         $5      
   10    15        SEND_VAR                                                 $5
    6    16        DO_ICALL                                         $6      
   10    17        SEND_VAR                                                 $6
    5    18        DO_ICALL                                         $7      
   10    19        SEND_VAR                                                 $7
    4    20        DO_ICALL                                                 
   14    21      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/Mk9F4
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $value, !1 = $name, !2 = $signum
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%5ESIG%5BA-Z%5D%2F'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $3      
          7      > JMPZ_EX                                          ~4      $3, ->10
          8    >   IS_EQUAL                                         ~5      !0, !2
          9        BOOL                                             ~4      ~5
         10    > > RETURN                                                   ~4
         11*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
215.92 ms | 1017 KiB | 19 Q