3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_match('/(\w+) (\w+)/', 'rodrigo capile', $m); var_dump($m); echo preg_match('/(\w+) (\w+)/', 'rodrigo capile rodrigo capile rodrigo capile', $m); var_dump($m); echo preg_match_all('/(\w+) (\w+)/', 'rodrigo capile rodrigo capile rodrigo capile', $m); var_dump($m); echo preg_replace_callback('/(\w+) (\w+)/', function($matches) {return strtoupper(matches);},'rodrigo capile rodrigo capile rodrigo capile');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RCZ22
function name:  (null)
number of ops:  35
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%2F%28%5Cw%2B%29+%28%5Cw%2B%29%2F'
          2        SEND_VAL                                                 'rodrigo+capile'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                         $1      
          5        ECHO                                                     $1
    4     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    6     9        INIT_FCALL                                               'preg_match'
         10        SEND_VAL                                                 '%2F%28%5Cw%2B%29+%28%5Cw%2B%29%2F'
         11        SEND_VAL                                                 'rodrigo+capile+rodrigo+capile+rodrigo+capile'
         12        SEND_REF                                                 !0
         13        DO_ICALL                                         $3      
         14        ECHO                                                     $3
    7    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
    9    18        INIT_FCALL                                               'preg_match_all'
         19        SEND_VAL                                                 '%2F%28%5Cw%2B%29+%28%5Cw%2B%29%2F'
         20        SEND_VAL                                                 'rodrigo+capile+rodrigo+capile+rodrigo+capile'
         21        SEND_REF                                                 !0
         22        DO_ICALL                                         $5      
         23        ECHO                                                     $5
   10    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                                 
   12    27        INIT_FCALL                                               'preg_replace_callback'
         28        SEND_VAL                                                 '%2F%28%5Cw%2B%29+%28%5Cw%2B%29%2F'
         29        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FRCZ22%3A12%240'
         30        SEND_VAL                                                 ~7
         31        SEND_VAL                                                 'rodrigo+capile+rodrigo+capile+rodrigo+capile'
         32        DO_ICALL                                         $8      
         33        ECHO                                                     $8
         34      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FRCZ22%3A12%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.32 ms | 1400 KiB | 23 Q