3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputEmails = array("@alpari.ru", "@alpari.org", "@forextime.com"); $clientEmail = "daniil.bugreev@alpari.org"; $emails = array_map(function ($item) {return preg_quote($item);}, $inputEmails); if (preg_match("/^.+(" . implode("|", $emails) . ")$/", $clientEmail)) { echo "match" . PHP_EOL;} else { echo "false" . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RIM0d
function name:  (null)
number of ops:  23
compiled vars:  !0 = $inputEmails, !1 = $clientEmail, !2 = $emails
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
          1        ASSIGN                                                   !1, 'daniil.bugreev%40alpari.org'
    3     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FRIM0d%3A3%240'
          4        SEND_VAL                                                 ~5
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    6     8        INIT_FCALL                                               'preg_match'
          9        INIT_FCALL                                               'implode'
         10        SEND_VAL                                                 '%7C'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $8      
         13        CONCAT                                           ~9      '%2F%5E.%2B%28', $8
         14        CONCAT                                           ~10     ~9, '%29%24%2F'
         15        SEND_VAL                                                 ~10
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $11     
         18      > JMPZ                                                     $11, ->21
    7    19    >   ECHO                                                     'match%0A'
         20      > JMP                                                      ->22
    8    21    >   ECHO                                                     'false%0A'
    9    22    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FRIM0d%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RIM0d
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'preg_quote'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
          5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FRIM0d%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.58 ms | 1396 KiB | 21 Q