3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isReserved($string = '') { $reserved_pattern = "/\b((a(bstract|nd|rray|s))|(c(a(llable|se|tch)|l(ass|one)|on(st|tinue)))|(d(e(clare|fault)|ie|o))|(e(cho|lse(if)?|mpty|nd(declare|for(each)|if|switch|while)|val|x(it|tends)))|(f(inal|or(each)?|unction))|(g(lobal|oto))|(i(f|mplements|n(clude(_once)?|st(anceof|eadof)|terface)|sset))|(n(amespace|ew))|(p(r(i(nt|vate)|otected)|ublic))|(re(quire(_once)?|turn))|(s(tatic|witch))|(t(hrow|r(ait|y)))|(u(nset|se))|(__halt_compiler|break|list|(x)?or|var|while))\b/"; return preg_match($reserved_pattern, $string); } echo 'static'; echo PHP_EOL; echo isReserved('static'); echo PHP_EOL; echo PHP_EOL; echo 'hello'; echo PHP_EOL; echo isReserved('hello');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CdIjt
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'static'
    9     1        ECHO                                                     '%0A'
   10     2        INIT_FCALL                                               'isreserved'
          3        SEND_VAL                                                 'static'
          4        DO_FCALL                                      0  $0      
          5        ECHO                                                     $0
   11     6        ECHO                                                     '%0A'
   12     7        ECHO                                                     '%0A'
   13     8        ECHO                                                     'hello'
   14     9        ECHO                                                     '%0A'
   15    10        INIT_FCALL                                               'isreserved'
         11        SEND_VAL                                                 'hello'
         12        DO_FCALL                                      0  $1      
         13        ECHO                                                     $1
         14      > RETURN                                                   1

Function isreserved:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CdIjt
function name:  isReserved
number of ops:  8
compiled vars:  !0 = $string, !1 = $reserved_pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      ''
    4     1        ASSIGN                                                   !1, '%2F%5Cb%28%28a%28bstract%7Cnd%7Crray%7Cs%29%29%7C%28c%28a%28llable%7Cse%7Ctch%29%7Cl%28ass%7Cone%29%7Con%28st%7Ctinue%29%29%29%7C%28d%28e%28clare%7Cfault%29%7Cie%7Co%29%29%7C%28e%28cho%7Clse%28if%29%3F%7Cmpty%7Cnd%28declare%7Cfor%28each%29%7Cif%7Cswitch%7Cwhile%29%7Cval%7Cx%28it%7Ctends%29%29%29%7C%28f%28inal%7Cor%28each%29%3F%7Cunction%29%29%7C%28g%28lobal%7Coto%29%29%7C%28i%28f%7Cmplements%7Cn%28clude%28_once%29%3F%7Cst%28anceof%7Ceadof%29%7Cterface%29%7Csset%29%29%7C%28n%28amespace%7Cew%29%29%7C%28p%28r%28i%28nt%7Cvate%29%7Cotected%29%7Cublic%29%29%7C%28re%28quire%28_once%29%3F%7Cturn%29%29%7C%28s%28tatic%7Cwitch%29%29%7C%28t%28hrow%7Cr%28ait%7Cy%29%29%29%7C%28u%28nset%7Cse%29%29%7C%28__halt_compiler%7Cbreak%7Clist%7C%28x%29%3For%7Cvar%7Cwhile%29%29%5Cb%2F'
    5     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6      > RETURN                                                   $3
    6     7*     > RETURN                                                   null

End of function isreserved

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
232.35 ms | 1003 KiB | 16 Q