3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "PDOConnectionFactoryDB7"; $upper = '[A-Z]'; $lower = '[a-z]'; $numeric = '[0-9]'; $regex = "(^{$upper}{$lower}+" /* <-- Connection and Factory */ . "|{$upper}+(?!{$upper})" /* <-- PDO and DB */ . "|{$numeric}+" /* <-- 7 */ .")$"; preg_match_all($regex, $str, $matches); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b32RM
function name:  (null)
number of ops:  29
compiled vars:  !0 = $str, !1 = $upper, !2 = $lower, !3 = $numeric, !4 = $regex, !5 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'PDOConnectionFactoryDB7'
    4     1        ASSIGN                                                   !1, '%5BA-Z%5D'
    5     2        ASSIGN                                                   !2, '%5Ba-z%5D'
    6     3        ASSIGN                                                   !3, '%5B0-9%5D'
    8     4        ROPE_INIT                                     4  ~11     '%28%5E'
          5        ROPE_ADD                                      1  ~11     ~11, !1
          6        ROPE_ADD                                      2  ~11     ~11, !2
          7        ROPE_END                                      3  ~10     ~11, '%2B'
    9     8        ROPE_INIT                                     5  ~14     '%7C'
          9        ROPE_ADD                                      1  ~14     ~14, !1
         10        ROPE_ADD                                      2  ~14     ~14, '%2B%28%3F%21'
         11        ROPE_ADD                                      3  ~14     ~14, !1
         12        ROPE_END                                      4  ~13     ~14, '%29'
         13        CONCAT                                           ~17     ~10, ~13
   10    14        ROPE_INIT                                     3  ~19     '%7C'
         15        ROPE_ADD                                      1  ~19     ~19, !3
         16        ROPE_END                                      2  ~18     ~19, '%2B'
         17        CONCAT                                           ~21     ~17, ~18
   11    18        CONCAT                                           ~22     ~21, '%29%24'
    8    19        ASSIGN                                                   !4, ~22
   13    20        INIT_FCALL                                               'preg_match_all'
         21        SEND_VAR                                                 !4
         22        SEND_VAR                                                 !0
         23        SEND_REF                                                 !5
         24        DO_ICALL                                                 
   15    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !5
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.95 ms | 1395 KiB | 17 Q